如何“记住我的密码”复选框工作? [英] How does the "Remember my password" checkbox work?

查看:222
本文介绍了如何“记住我的密码”复选框工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有许多登录表单,带有记住我的密码小复选框,以便下次访问该网站时,浏览器会自动填充您的密码字段。

There are numerous login forms with the little check box "Remember my password" so that the next time you visit the website, the browser automatically fills up the password field for you.

但我注意到在现代浏览器中的行为,如Chrome / Firefox,它显示一个通知栏来保存用户名/ passoword,即使该特定的网页没有任何记住密码复选框。

But I have noticed a behavior in modern browsers, such as Chrome/Firefox, which shows up a notification bar to save the user name/passoword even though that particular web page does not have any "remember password" check box.

所以我的问题是:


  1. 如果我要密码复选框在登录形式,我该怎么做,当用户检查它?我的意思是,我必须将密码存储在浏览器Cookie(或本地存储)中吗?

  2. 保存密码通知栏是浏览器的功能,还是有任何方法从网页调用它?


推荐答案

您需要在客户端保存一个cookie,
现在使用HTML5我会建议您使用本地存储
i使用此 jstorage plugin

you need to save a cookie on the client side, encrypted ofcourse. now with HTML5 i will recommend you to use Local Storage i use this jstorage plugin

这篇关于如何“记住我的密码”复选框工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆