Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发应用程序的登录/ucp 模块,我很想添加一个“记住我”选项来记住当前登录的用户并让他们在下次访问时保持登录状态。
我知道这需要 JavaScript cookie,而且我以前从未做过这样的事情。您是否有任何样板代码或教程可以帮助我通过 js 和 cookie 设置“记住我”系统?提前致谢!
看看这个帖子。
持久登录 Cookie 最佳实践
这是一篇很好的帖子,帮助我之前开发了相同的功能:
记住我功能
其中有这篇文章的链接...