How to make Firefox remember *all* passwords (even when logging to PayPal & Yahoo Mail)
NOTE (2011/Mar/17): The following “trick” applies to Mozilla Firefox, versions 3.0.x, 3.5.x and 3.6.x. For Firefox v. 4.0.x (currently beta/RC), 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).
65 comments |


1 August 29th, 2008 at 07:12
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 September 4th, 2008 at 10:52
another approach would be in the same snipplet to make it “return false”.
3 October 5th, 2008 at 23:57
Your trick worked! Thanks a lot!
4 October 6th, 2008 at 09:45
@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… :-)
5 October 23rd, 2008 at 13:02
was looking all over FireFox forum for a solution. Thank you very much for sharing. Thank you thank you
6 October 23rd, 2008 at 13:24
You’re welcome, ‘thankfull’! I am glad I’ve helped:)
7 October 27th, 2008 at 16:06
Hello, how can I save passwords and logins but not have Mozilla prompt me each time?
8 October 27th, 2008 at 17:20
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’:
…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! :-(
9 November 19th, 2008 at 23:49
FN worked! Thanks.
10 January 11th, 2009 at 20:34
for suse 11.1 it’s /usr/lib/xulrunner-1.9.0.5/components/nsLoginManager.js
11 February 16th, 2009 at 22:34
@Michael: Comment out lines 112 and 121.
12 August 7th, 2009 at 03:14
The edit was maintained after upgrading from 3.0.12 to .13. Thanks for the suggestion.
13 November 21st, 2009 at 04:12
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.
14 November 21st, 2009 at 11:51
@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! :)
15 November 22nd, 2009 at 06:40
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
16 November 22nd, 2009 at 10:16
@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! :)
17 November 22nd, 2009 at 14:19
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.
18 November 22nd, 2009 at 14:55
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!
19 November 22nd, 2009 at 23:38
Thank you for your Patience!!!
That is exactly what I am doing. :) but I am still getting the same Err. Msg.
20 December 2nd, 2009 at 16:06
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?
21 December 2nd, 2009 at 16:13
sorry, found out :-)
22 December 2nd, 2009 at 16:23
@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.jsSo the location of the file (WinXP) is:
C:\Program Files\Mozilla Firefox\components\nsLoginManager.jsTo 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! :)))
23 December 2nd, 2009 at 16:24
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:)
24 December 21st, 2009 at 23:47
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
25 December 22nd, 2009 at 10:39
@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!
26 December 22nd, 2009 at 15:28
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
27 December 23rd, 2009 at 01: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… :)
28 December 23rd, 2009 at 05:45
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
29 December 23rd, 2009 at 12:19
@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! ;-)
30 December 24th, 2009 at 12:06
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.
31 December 24th, 2009 at 12:14
@Claus:
Try the workaround which is suggested in my article. Might work for you, too:)
32 January 12th, 2010 at 19:19
Thanks! It worked for me. Great tip!
33 October 21st, 2010 at 19:38
YES
This is exactly what I needed… well the other way around anyways.. to make it always true instead
34 January 31st, 2011 at 20:58
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.
35 February 1st, 2011 at 14:42
@Ben:
Thanks for the update! :)
36 February 12th, 2011 at 17:16
i m using windows 7… whr cn i find the file nsLoginManagerPrompter.js.. with moxilla firefox 4.0beta 11
37 February 14th, 2011 at 09:28
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… :(
38 March 9th, 2011 at 15:46
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) !
39 March 9th, 2011 at 15:54
@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… :(
40 March 16th, 2011 at 18: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.
41 March 17th, 2011 at 09:27
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! :)
42 March 26th, 2011 at 07:37
Try uni-extract – it seems to unpack everything I need. You can find it here: http://legroom.net/software/uniextract
43 May 1st, 2011 at 19:11
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
44 May 2nd, 2011 at 07:58
@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.) :)
45 May 5th, 2011 at 22:50
Fermins solution did the trick. Thanks alot. Although I couldn’t extract the omni.jar with 7-zip, but it worked perfectly with WinRAR.
46 June 28th, 2011 at 02:12
This works for FF5 too. I had to use WinRAR for the extraction and creation.
47 June 28th, 2011 at 23:29
@Aaron:
Great news! So the trick continues to work with FF4.0 and 5.0! :-)
48 July 17th, 2011 at 04:29
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?
49 July 17th, 2011 at 09:48
@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! :)
50 July 17th, 2011 at 11:58
@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?
51 July 17th, 2011 at 12:30
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…) :)
52 July 21st, 2011 at 18:27
on firefox5 no nsLoginManager.js in omni.jar , none of yours methods works !
Help !!!!
53 January 14th, 2012 at 05:14
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.
54 January 15th, 2012 at 00:58
Tools > Options
Click the Security tab
Uncheck – Remember passwords for sites
Joe
55 February 8th, 2012 at 00:33
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.! :((
56 February 8th, 2012 at 11:06
@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?…
57 February 16th, 2012 at 18:06
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.
58 February 16th, 2012 at 19:43
I think there’s an option for this in Tools > Options! :)
59 February 16th, 2012 at 22:06
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.
60 February 16th, 2012 at 22:16
Yes. Well, that’s strange. Perhaps you should ask in the Mozilla Firefox forums?…
61 February 16th, 2012 at 22:55
Will do…and report back here w/resolution, if any. Thanks for your help.
62 February 23rd, 2012 at 15:26
please update it for firefox 10
63 August 12th, 2012 at 03:56
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/
64 August 13th, 2012 at 12:59
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!
65 March 16th, 2013 at 08:05
i’m using windows 7.after i changed using notepad i cant save it.access denied..why…pls