SOLUTION: Force Firefox 3 to autofill username and password!

NOTE: this technique applies to FireFox 3, not later versions. As Peter noted in the comments, later versions of FireFox do not contain the applicable .js files.

Q. Some websites (like Chase, Gmail, WordPress) won’t autofill my login credentials even though I saved them with FireFox 3. What’s up with that?!

A. Good question. Sites can specify autocomplete=”off” to prevent browsers from filling in login info. This  is what is causing your  problem, though it is meant to be a beneficial security feature to prevent someone from logging into with your saved/remembered info. However, it can be really annoying if you have to start typing  your username password in each time! It is especially annoying if you’re using an autologin script (b/c that script won’t work if the login info isn’t autofilled).

So, here’s how to fix it by making FireFox 3 ignore the “off” setting:

WARNING: after this modification, anyone using your browser may have your login info filled in if they visit a site where you’ve saved the info!

use your favorite text editor to edit the nsLoginManager.js fil located in C:\YOUR FIREFOX FOLDER\components\ folder (or C:\FirefoxPortable\App\Firefox\components\ for portable firefox)

Locate the following lines of code (use the find feature of your text editor), and comment out three lines by adding // (double slash) in front of the lines.

Before the change (honors autocomplete “off” setting)
if (element && element.hasAttribute(“autocomplete”) &&
element.getAttribute(“autocomplete”).toLowerCase() == “off”)
return true;

After the change (always sets autcomplete to “on”

// if (element && element.hasAttribute(”autocomplete”) &&
// element.getAttribute(”autocomplete”).toLowerCase() == “off”)
// return true;

Screenshot showing the lines commented out

More info…

Where I first heard about this solution:

Fix Firefox Does Not Save, Store or Remember Password On Some Sites Permanently for Always Auto-Complete » My Digital Life web browser has built-in password manager that able to save, store or remember user name, ID and password credentials to auto-fill and auto-complete the login or logon…

The opposite problem:

Forcing Firefox to obey autocomplete=”off” for password fields | VerySimple particular, Firefox will *always* populate certain password fields. There is seemingly no way to tell Firefox not to fill in a field if it really wants to do so. This can be a…


Leave a Reply

Your email address will not be published. Required fields are marked *