How to make Firefox remember *all* passwords (even when logging to PayPal & Yahoo Mail)
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…
32 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!