Most browsers now have a handy password-remembering feature, but in public places this is not safe for users. So in order to block the browser to remember the password, the experts of each road, put forward a lot of good ways.
It would be nice if the browser gave the developer an API to clear the browser's cache information.
Now directly on the method, grammar what is not smooth place please forgive me ... 囧
1. Add autocomplete= ' off ' to the form input controlin some browsers, such as Chrome), does not prevent the ability to remember passwords and is valid in IE. 2, in front of the password box plus a <input type= ' hidden ' >after experimenting, <input type= ' hidden ' > is not always effective, it is recommended to use <input type= ' text ' style= ' Visuable:hidden; ' , but after the user loses the user name password, the browser will have "intimate" prompt:
so this is still not very force AH. 3. After the page is loaded, the contents of the Password box and text box are emptied dynamically .In fact, a space is used to replace the information that the browser fills in automatically.
Window.onload = function () { document.frmcustome.password.value = ';}
When the user enters information, the text box defaults to a space, and if the user does not clear the space, the input error message is created.
4. Dynamically change the type of the text box to the password type
$ (document). Ready (function () { Document.getelementsbyid (' password '). type= ' password ' l;});
5, the website transmission protocol with HTTPS HTTPS protocol Web page, the browser does not record the value of the form. 6, use Flash to do landing page only to see the web game to do so ... Other common sites to do so, it may be high cost, the second is the search engine unfriendly, reduce the level of search engine optimization. 7, do not use HTML native password control, do a custom password control if time is not tight can do one.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
For user information security, block the browser's remember password function