UPDATE (2013/Nov/18): There is a new and better way of dealing with the issue. Simply download and install the following Firefox add-on:

https://addons.mozilla.org/en-US/firefox/addon/remember-passwords/

It will patch automatically the original Firefox Login Manager, to allow saving of passwords on forms which otherwise suppress it.

If you want to try the older, manual method of doing it, check my older post (see below); mind, in latest versions of Firefox the manual method may not work — I haven’t tested it.

* * *

Note: The following “trick” applies to Mozilla Firefox, versions 3.0.x, 3.5.x and 3.6.x. For Firefox v. 4.0.x and later, please refer to the following comment (thanks, Jason!).

You have maybe noticed, when you log in to PayPal, Yahoo! Mail, Live Mail and some other websites, that Firefox 3 does not give you the option to save the name & password for you, which in certain cases is a nuisance.

The reason? Security. In the forms of these websites, in the field INPUT, the following code appears:

<input autocomplete="off" type="..." ... />

When "autocomplete" is ‘off’, then the browser (quite correctly) does not give the user the option of saving the password for him. For websites, such as PayPal, for example, using which you can transfer small or large sums of money, this is a very wise approach.

On the other hand, in this case, you have to manually type each time your username and/or password, which can be quite annoying (especially if they are very long/secure). If you are using your own computer/laptop, and you think that you do not need that extra bit of security, there is a very easy way to make Firefox 3 to remember the passwords even for these secure websites, which set autocomplete to “off”.

Here’s how:

(The instructions below are for Microsoft Windows XP Professional and Windows XP Home Edition; if you use another operating system (Windows Vista, MacOS X or some of the distributions of Linux), search in an analogical way!)

Step One: Close Firefox browser (if it is open).

Step Two: Navigate to the directory where Firefox is installed, and then open ‘components’ — here is the exact location in Windows XP Professional:
C:\Program Files\Mozilla Firefox\components\

Step Three: Open with Notepad or any other plain text editor the following file:
nsLoginManager.js

Step Four: Find the code:

  _isAutocompleteDisabled : function (element) {
    if (element && element.hasAttribute("autocomplete") &&
        element.getAttribute("autocomplete").toLowerCase() == "off")
        return true;
    return false;
  },

Step Five: Comment in this JavaScript code three lines, as shown below:

  _isAutocompleteDisabled : function (element) {
    // if (element && element.hasAttribute("autocomplete") &&
    //     element.getAttribute("autocomplete").toLowerCase() == "off")
    //     return true;
    return false;
  },

5) Start Firefox again. Done! :-)

Now, when you login to websites, which do not allow the browser to remember usernames and/or passwords, Firefox will offer you the option to save the data, just like in others, not-so-secure websites!

I hope this tip will be useful for someone, beside me… Enjoy! :-)

____________
Some Notes:
(1) Use at your own risk and responsibility! In the case someone succeeds in stealing online all of your millions, thanks to your saved password and my (in)valuable advices, I declare to be deprived of all responsibility! :-)
(2) I am not sure, what will happen, if you update your version of Firefox (for example, 3.0.0 to 3.0.1). It is possible that the changes in the file will be lost and file will be over-written. But this is not such a big trouble, because if you have already logged in into most of these websites, then the usernames/passwords will remain saved — worst case, if need be, you can just make the change in the nsLoginManager.js file again, after a Firefox update!
(3) I used as base for my article information from this comment — but the user, which has left it, unfortunately, did not leave a name or URL, so I can’t give him/her full credits… :-(
(4) I have tested this method with Firefox 3.0.1 (English-US). For earlier versions of Firefox, I am not sure, if it will work — and anyway, I believe that Firefox 2.0.x had quite a different policy in regard to saving usernames and passwords in forms…
(5) (2011/Mar/17) I have also tested with Firefox 3.5 and 3.6, and the fix continues to work as expected. Once Firefox 4.0 is released, I will update this post (the JS file is in a different location in FF4).

67 thoughts on “How to make Firefox remember *all* passwords (even when logging to PayPal & Yahoo Mail)

  1. MacOS file location for nsLoginManager.js is defaulted to /Applications/Firefox.app/Contents/MacOS/components/

    This is for Firefox 3.0.1. You have to right click the firefox app, and choose “Show Package Contents” option to get into the package directories instead of launching the app.

  2. @Robert:

    Thanks for the MacOS X update for the same technique for Firefox! :-)

    @J:

    I don’t like the ‘snippet trick’ (even if I can make it work), as I have to load it manually every time I have to open such a secure site. After I edit nsLoginManager.js, everything becomes automatic!

    @Hao:

    You’re welcome, glad I helped… :-)

  3. was looking all over FireFox forum for a solution. Thank you very much for sharing. Thank you thank you

  4. Hello, how can I save passwords and logins but not have Mozilla prompt me each time?

  5. Hi, Steve!

    Unfortunately, I do not know a way of achieving that in Firefox 3…

    If you are using Windows XP, then the Firefox file, which shows the prompt to ‘save passwords information bar’:

    Do you want Firefox to remember this password?
    a) Remember,
    b) Never for this site,
    c) Not now. “”

    …is the following:
    C:\Program Files\Mozilla Firefox\components\nsLoginManagerPrompter.js

    I guess, if one’s good at programming, it would be possible to ‘hack’ this file, and to make the prompt not appear, and Firefox to automatically save all passwords, without prompting the user…

    …but I can’t do it, and I do not know of a way of doing this… Sorry! :-(

  6. The edit was maintained after upgrading from 3.0.12 to .13. Thanks for the suggestion.

  7. Scripting hacks don’t appear to work on Firefox 3.0.13 for Windows XP. I tried this one and another and neither did it.

  8. @Dave:

    This is not a scripting hack, exactly. For Firefox 3.5+, I am pretty sure that this little trick with the passwords will work. Just be sure to have Firefox closed, while you edit the nsLoginManager.js file! I have tested on FF 3.5/WinXP Pro, and it works like a charm!

    Hope this helps! :)

  9. When you say comment does it mean save? Because I followed your instruction but

    For some reason I’ts not working for me..

    Error: Cannot create the C:\Program Files\Mozilla Firefox\components\nsLogin.jsfile.

    Make sure that the path and file name are correct.

    HELP plssssssss

  10. @xtan:

    “Comment” means put “//” in front of each line in the nsLoginManager.js file, located here:
    C:\Program Files\Mozilla Firefox\components\

    Where to comment? This is explained as well.

    Please, read the instructions more carefully and try again! :)

  11. Any suggestions why I am still getting this Msg after I save the changes

    Err: Cannot create the C:\Program Files\Mozilla Firefox\components\nsLoginManagers.jsfile

    Make Sure that the path and file are correct.

  12. You must not create a file:

    nsLoginManagers.jsfile

    You must open existing file: C:\Program Files\Mozilla Firefox\components\nsLoginManager.js

    …with Notepad or Wordpad and then edit it, then save. Firefox must be closed while you edit the file. Hope this helps!

  13. Thank you for your Patience!!!

    That is exactly what I am doing. :) but I am still getting the same Err. Msg.

  14. Me too:

    I guess, if one’s good at programming, it would be possible to ‘hack’ this file, and to make the prompt not appear, and Firefox to automatically save all passwords, without prompting the user…

    But how to?

  15. @xtan, @Claus:

    You do not need to be a programmer to be able to ‘hack’ this file. I am not a programmer, but I was able to easily edit it myself. Just follow the instructions, step by step, and you’ll be able to achieve the same functionality (Firefox will save all, or almost all, passwords, after the file is edited).

    Steps are, as I already mentioned:

    1) Close Firefox browser.

    2) Navigate to the directory where Firefox is installed, and then open the “components” folder — here is the exact location in Windows XP Professional, and on other operating systems, you should be able to locate the place fairly easily, too:
    C:\Program Files\Mozilla Firefox\components\

    3) In the folder “components”, you will find a list of files. Open with Notepad or Wordpad or any other plain text editor the following file: nsLoginManager.js

    So the location of the file (WinXP) is:
    C:\Program Files\Mozilla Firefox\components\nsLoginManager.js

    To open the file with Notepad, right-click it, and select “Open with…” then select Notepad from the list (if Notepad is not listed, click on “Choose program…” button and find it).

    4): In the file that you opened, find this piece of code:

      _isAutocompleteDisabled : function (element) {
        if (element && element.hasAttribute("autocomplete") &&
            element.getAttribute("autocomplete").toLowerCase() == "off")
            return true;
        return false;
      },
    

    5) Now comment in this JavaScript code three lines, as shown below:

      _isAutocompleteDisabled : function (element) {
        // if (element && element.hasAttribute("autocomplete") &&
        //     element.getAttribute("autocomplete").toLowerCase() == "off")
        //     return true;
        return false;
      },
    

    (To “comment” code in JavaScript means to add "//" in front of each line.)

    5) After that, of course, save the file (ctrl+s or File > Save) and then close it. Start Firefox again. That’s it! :-)

    Hope this helps! :)))

  16. PS Glad that you’ve found out yourself. Still, I hope my (a bit more detailed) instructions will help other users, too… I cannot explain it better than that:)

  17. Hello…I too have the same problem as anohther guy did.

    I did all of the steps exactly as explained. I found the proper code and entered the following:

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

    They all appear in one line and I just entered the comment in from of each on the same line.
    All I keep getting is this message:

    Err: Cannot create the C:\Program Files\Mozilla Firefox\components\nsLoginManagers.jsfile

    Make Sure that the path and file are correct.

    Am I supposed to put them on sperate line on the notepad?

    Can you please help me?…although I know this may be frustrating for you…

    Many thanks.

    T

  18. @Tara:

    Hmm, this sounds strange.

    I really don’t know why you see error:

    “Err: Cannot create the C:\Program Files\Mozilla Firefox\components\nsLoginManagers.jsfile”

    The full path is supposed to be:
    C:\Program Files\Mozilla Firefox\components\nsLoginManagers.js

    The “//” comments you inserted are correct.

    If problem on your side persists, I may try to upload here for review & download a sample
    nsLoginManagers.js file which you could test (and see how it is edited).

    Hope this helps!

  19. Thank you so much for your reply.

    I tried it again and when I went to save, I get this message:

    Access to C:\Program Files\Mozilla Firefox\components\nsLoginManagers.js is denied.

    Does the spacing matter when you insert the comments? Arrrggg…why is this not working for me?

    My computer is running windows vista, and Firefox version 3.0.16, not sure if that makes a difference.

    I really appreciate your help…Thank you!!

    T

  20. @Tara:

    First of all, I’d recommend to you to upgrade to latest Firefox 3.5.x — I don’t see a reason why not to? :)

    Second, on Windows Vista it’s possible that the security settings of the operating system may simply prevent you from editing/saving the file! (Windows XP is much more forgiving in this aspect…) Ideas, if this is the issue? Not sure… Maybe try to save/replace the file as Administrator?

    Third, you must be sure that Firefox is not running when you try to save the file!

    Hope this may help you… if not, hopefully we’ll still be able to come up with a solution of some sort… :)

  21. Thank you again for your reply. You have been very patient and helpful – very much appreciated!

    I did upgrade to Firefox 3.5.6. I also set my User control setting to off, which I think that did the trick…because it worked!! :)

    However, I was actually looking for something that would save all of my user names and passwords without any prompts or pop ups at all…kind of like an auto save I guess.

    Any suggestions or thoughts on this??

    Thank you again, it really is nice of you to take the time to answer my questions.

    T

  22. @Tara:

    Glad that it worked — now you can save all of your passwords! So it was a Vista security issue, after all…

    About the other feature you ask — I do not think you can autosave everything without even a prompt. And I would not recommend to you to do it this way, even if it was possible.

    After all, every time you enter a username and a password and login somewhere, FF shows you a small info bar at the top, with “Remember password / Never for this site / Not now”. First, you have a choice, which is good (you do not need to save everything, 100% of the time!). Second, if you wish the password to be saved at the moment, simply press “R” on your keyboard, and it will be saved, and the info bar will disappear. Useful and easy!

    Hope this helps and… happy saving passwords! ;-)

  23. Is it possible to FORCE FF to save a login if FF ignores the possibility.
    I have the “problem” with a Linksys router where the login is not saved.
    With a newer version of the Linksys router there is no problem.

  24. YES

    This is exactly what I needed… well the other way around anyways.. to make it always true instead

  25. Just FYI, with Ubuntu and Firefox 3.6.13, I found the applicable entry at /usr/lib/firefox-3.6.13/components/nsLoginManager.js. The file provided above for SUSE does exist in Ubuntu in the xulrunner directory, but does not appear to apply to FF 3.6 on Ubuntu.

  26. i m using windows 7… whr cn i find the file nsLoginManagerPrompter.js.. with moxilla firefox 4.0beta 11

  27. Hi,

    For Mozilla Firefox 3.6.x:

    — try looking here, if you are on Windows 7 32bit:
    C:\Program Files\Mozilla Firefox\components

    — or here, if you are on Windows 7 64bit:
    C:\Program Files (x86)\Mozilla Firefox\components

    Both nsLoginManager.js and nsLoginManagerPrompter.js files are there.

    For Firefox 4, though, I cannot find these files. Looks like the FF dev team decided to move the code somewhere else or maybe create a .dll for it… :(

  28. thanks, this post was very useful to me (and now I understand that certain sites did disable the autocomplete feature on purpose rather than producing bad html/javascript) !

  29. @Andre:

    Glad I helped! :)

    //On a sideline: I looked deeper into Firefox 4.0 Beta and seems they changed some core files. I am not sure this trick would ever work in FF 4… :(

  30. Ok after a little digging through sourcecode here is what I have found on forcing autocomplete in Firefox 4. The Firefox Devlopers have moved any files they could in to an archive file called omni.jar. (http://blog.mozilla.com/mwu/2010/08/13/omnijar-how-does-it-work/) You can open it in Firefox itself but not edit it in firefox. (jar:file:///C:/Program%20Files%20%28×86%29/Mozilla%20Firefox/omni.jar!/components/) 7-zip the tool most of us would use to unpack it is not able to handle the format Mozilla used. There is still some question on if other tools like winrar and winzip can correctly repack the files the way firefox was expecting too (http://sourceforge.net/projects/sevenzip/forums/forum/45797/topic/4014723) (http://forums.mozillazine.org/viewtopic.php?f=23&t=2129699&start=0)
    (https://bugzilla.mozilla.org/show_bug.cgi?id=595473) Long and short of it hopefully the Mozilla developed will switch to a more common and recognized compression format as this also affects the Firefox theme builders apparently. Once they do we can open and edit nsLoginManager.js as normal within the omni.jar compressed file.

  31. Jason,

    Thanks for your help! Seems Mozilla Firefox 4 users will have a chance to save all passwords, too — in case they want to!

    I’ll make some tests and will probably update my article soon.

    Thanks again! :)

  32. Hi Michael, hi Jason,

    Thanks for the tip. I tried the steps suggested by Jason and after editing the file nsLoginManager.js, I packed it again using ZIP format and SFX option. THen rename the whole file back to omni.jar and it worked (using WinXP/SP3, Firefox 4.0.1). Here are the steps so somebody can replicate and check:

    0. Make a backup copy of omni.jar
    1. Unzip the omni.jar (using either 7zip, Winrar)
    2. Edit accordingly
    3. Pack again using ZIP format + SFX option (Self-Extract)
    4. Rename back to omni.jar
    5. Launch Firefox!

    Regards aus Germany

  33. @Fermin:

    Thanks for testing this!

    I did not yet check but seems that your steps for making it work on Firefox 4 are the correct ones! (I suppose that on Mac things are very similar.) :)

  34. Fermins solution did the trick. Thanks alot. Although I couldn’t extract the omni.jar with 7-zip, but it worked perfectly with WinRAR.

  35. This works for FF5 too. I had to use WinRAR for the extraction and creation.

  36. How can I re-package the folder in Mac?
    I have tried compressing it into zip file using iArchiver and Mac’s built-in compressor, but Firefox kept giving me a crash report every time I tried to start Firefox.app
    I did re-packaged the edited omni folder without the SFX option because there is no SFX option in iArchiver nor Mac’s built-in compressor. Is the SFX option really necessary?
    If so, is there any Mac app that has SFX option in its compression?
    If it is not necessary, then what am I missing?

  37. @Jane:

    Try (Win)RAR for MacOS: [ download link ]

    Select version: RAR for Mac OS, English, v. 4.01

    On Windows, WinRAR does an excellent job of re-packaging *.jar files! So use it to un-pack the file, change inside the nsLoginManager.js file, then re-pack it again. Pack it as *.zip, then simply rename it to *.jar. It should work. Let me know if it helps! :)

  38. @Michel

    Your suggested solution did not work.
    http://www.win-rar.com/index.php?id=24&kb=1&kb_article_id=64

    RarLab supports only command line RAR for Mac OS and command line RAR supports only archiving files into .rar and not .zip.
    I have tried archiving and applying SFX option to the omni directory and after archiving, changing the compressed directory (now omni.rar) into omni.jar. However, this attempt did not let me start nor give me a crash report when I tried to start Firefox.app

    I have also tried archiving omni directory into omni.zip and then apply the SFX option, but WinRar would not allow me to do so because it only applies this option to .rar files.

    Do you have other possible solution?

  39. Well in that case, I am not sure how I can help…

    Judging by the sources I’ve found so far, it appears that JAR files are simple ZIP files. You can rename omni.jar to omni.zip > then un-zip it, then inside this folder you can modify the nsLoginManager.js file, then you can again zip the entire folder to omni.zip > rename to omni.jar and you’re ready to go!

    Another option is: rename omni.jar to omni.zip; then open the ZIP archive with your favourite ZIP program, in it, locate the nsLoginManager.js and open it right from inside the archive; modify it and close it; then close the ZIP file. If your ZIP program is intelligent, it will instantly know that there has been some changes done to the ZIP archive and before you close it, it will suggest to re-save it (save changes). Do so. Then rename the modified omni.zip to omni.jar and this modified file should do the trick!

    If all of the above doesn’t help, ask a fellow Mac user or Google… (I have not much experience with Macs, sorry…) :)

  40. on firefox5 no nsLoginManager.js in omni.jar , none of yours methods works !

    Help !!!!

  41. Hello!

    I’m using Firefox 9.0.1, the OS is windows 7 Ultimate, how can I stop Firefox notification bar in prompting to save the password.

    Thanks.

  42. hi
    I’m using Firefox 10 on mac OSX but none of these helped. :(
    I renamed the .ja file into zip, unzipped it and went into nsLoginManager, commented the 3 lines of code zip again and renamed as .ja file. But i am gettin a crash error when i start firefox.!!
    pls help.! :((

  43. @Cas:

    If there’s a crash error, probably there’s a mistake somewhere in the newly ZIP-ped file, I would guess. So Firefox cannot read it properly, and crashes.

    Remember comments in JS can be like this:
    //
    and you should make one comment per line, total three lines of code should be commented.

    Maybe also Firefox cannot read the ZIP file properly after it has been re-zipped and then renamed back to .jar?…

  44. Hello all–I’m on FF 10.0.1 now. How can I get FF to automatically remember usernames and passwords without prompting even the first time? Many thanks.

  45. Michel-if you are referring to the password box on the security tab, I do have that checked and still get the question asking if FF should remember the password.

  46. I did the original “hack” of the nsLoginManager.js file when I had an older version of Firefox, and it worked great. Now I have Firefox 14 (due to a computer crash), and I found a similar file to the one mentioned above called omni.ja (NOT .jar, so don’t know what that is). Didn’t really know if this was actually a jar file, so did some searches, and actually found a Firefox add-on to fix this problem!!!

    Here is the link:
    https://addons.mozilla.org/en-US/firefox/addon/remember-passwords/

  47. Thank you, Gloria! :)

    An add-on is a much better option than trying to modify your core Firefox files. I’ll try this add-on right now!

  48. i’m using windows 7.after i changed using notepad i cant save it.access denied..why…pls

  49. as i am using windows 8.1 so can i use same trick for fire fox to save passwords without asking ??? i tried above steps but i didn’t get it can u help me how to do in windows 8.1 os please ??????????

Leave a Reply

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