Firefox – Force Firefox to remember passwords for the sites that don’t let users save them

firefoxpassword-managementpasswords

With Firefox 3.6.10 on Windows XP (I haven't tried other combinations), it seems like some websites prevent visitors from saving their password. That happens a lot with bank websites (for obvious security reasons), but I'm also experiencing that with myopenid.com and others.

Is there a way to force Firefox to remember passwords for ALL sites?

I have tried many tricks found on the web, but none of them work in all cases.

One of these tricks was to run a Javascript in order to remove the autocomplete="off" property from the password field, which seems to help in some cases, but not all.

Another trick is to modify some Firefox configuration file, but again some websites are resistant to that. One such website is myopenid.com.

Please note that this is not a duplicate of Firefox: Remember new passwords without prompting. Here I'm asking for a tweak that will save passwords for the sites that don't let users save them.

Note: Now I'm getting confused because it's working again. I have disabled all addons and it's saving the passwords again on myopenid.com. I think the Javascript solution proposed below is OK but I have another one I like better, I will post it too.

Best Answer

OK so here is another answer I think is more convenient that the Javascript one.

First go to your Firefox components folder, by default in my case it's "C:\Program Files\Mozilla Firefox\components"

Now open the file nsLoginManager.js

Go to the function at around line 804 (varies with version of Firefox), that reads:

/*
 * _isAutoCompleteDisabled
 *
 * Returns true if the page requests autocomplete be disabled for the
 * specified form input.
 */
_isAutocompleteDisabled :  function (element) {
    if (element && element.hasAttribute("autocomplete") &&
        element.getAttribute("autocomplete").toLowerCase() == "off")
        return true;

    return false;
},

Now comment out the first 3 lines, so it ends up like this:

/*
 * _isAutoCompleteDisabled
 *
 * Returns true if the page requests autocomplete be disabled for the
 * specified form input.
 */
_isAutocompleteDisabled :  function (element) {
    /*if (element && element.hasAttribute("autocomplete") &&
        element.getAttribute("autocomplete").toLowerCase() == "off")
        return true;*/

    return false;
},

Save it, restart Firefox and you should be good to go...