1 entry for December, 2009

Disable password autocomplete in Firefox

Handy little trick to make Firefox behave in a more security-conscious manner

Saturday, December 5th, 2009

Firefox seems intent on autocompleting password fields, whether you want it to or not, which is not good for security if you’re building a web app with “old password / new password” functionality.

Luckily, I’ve found a way to trick it into not doing this.

Simply place a hidden password field, with no name, at the start of your form:

<input type="password" style="display: none;"/>

This seems to trick firefox into thinking that this is the main password field, but as there’s no name it a) doesn’t get set and b) doesn’t get submitted.

Great :)