Why isn't the browser asking to remember the password? [duplicate]

无人久伴 提交于 2019-12-14 01:32:26

问题


What do you need to do on a login form so that the browser prompts to remember the login information? I have a input named "username" and one named "password".

on my browser i have it set to ask if it should remember the password, and it does on most sites, but on the site that i am testing it doesnt, so i am wondering what can be changed to make it remember.

i am also using the type=password for the password field, and it logs in fine and everything, but neither firefox, or safari want to remember it. it is not a huge problem, but it would be nice to figure out

Thanks

here is the form:

<form id="login" method="post" action="/login.php">
<div class="cell">

<div class="left">Username: </div>
<div class="right">
<input type="text" id="username" name="username"> 
</div>

<div class="left">Password: </div>
<div class="right">
<input type="password" id="password" name="password">

回答1:


Make sure your input is type="password". If its type is text, it won't work.




回答2:


Usualy nothing... Browser take care of that. There is a attribute in HTML to tell browser NOT to remember

autocomplete=off



回答3:


Firefox (I don't use the others, but I assume it mostly applies) will remember what you enter in any field of any form. Passwords are special probably because the field is marked as type="password" so Firefox will (by default) ask if you want to remember the credentials. If you select "Never ask again" it will never ask again, which might be what you're seeing. It stores this information per page and there's a setting somewhere which allows you to reset this, of course.



来源:https://stackoverflow.com/questions/2580379/why-isnt-the-browser-asking-to-remember-the-password

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!