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

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.


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...


The following tweak is what you need. I've been using it for a long time and it's saved me a lot of time.

Tweak Firefox’s Password Saver Without An Extension:

  1. Bookmark the link on the above page referred to as Password Saver. To bookmark the link just right-click on it and select "Bookmark This Link...". (It's a Java script. I cannot link it here because of html-editing limitations.)
  2. The next time you find a site that won't remember your password just click on the bookmark. It will then remove all instances of autocomplete="off".
  3. Type your username and password into the site and press submit.
  4. That's all! You should now be prompted to let Firefox remember your password.

Screeny:

alt text