How do I suppress firefox password field completion?
Solution 1
From Mozilla's documentation
<form name="form1" id="form1" method="post" autocomplete="off"
action="http://www.example.com/form.cgi">
[...]
</form>
http://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion
Solution 2
The autocomplete="off"
method doesn't work for me. I realized firefox was injecting the saved password in the first password field it encountered, so the solution that worked for me was to create a dummy password field before the password update field and hide it. Like so:
<input type="password" style="display: none;" />
<input type="password" name="password_update" />
Solution 3
Have you tried adding the autocomplete="off" attribute in the input tag? Not sure if it'll work, but it is worth a try.
Related videos on Youtube
Christian Oudard
My programming interests include web development, databases, algorithms, AI, and optimization. My favorite language is Python.
Updated on April 17, 2022Comments
-
Christian Oudard about 2 years
I'm developing a website. I'm using a single-page web-app style, so all of the different parts of the site are AJAX'd into index.php. When a user logs in and tells Firefox to remember his username and password, all input boxes on the site get auto-filled with that username and password. This is a problem on the form to change a password. How can i prevent Firefox from automatically filling out these fields? I already tried giving them different names and ids.
Edit: Someone has already asked this. Thanks Joel Coohorn.
-
Christian Oudard over 15 yearsI agree about the bookmarking and back button, but it's not my choice :(
-
BoCyrill over 7 yearsThat did not work for me. But the following answer worked for me
http://stackoverflow.com/a/26156376/4601322
-
LeO over 6 yearsThe hidden field is quite nice although its for FF only. Still the only solution if working with Angular. The web-docu does not work :-/