How to Force Firefox to Save Passwords from Secure HTTPS Websites?

by Strider on June 28, 2010

in Tips 'n' Tricks

Mozilla Firefox is one of the most,  stable,  fast and secure web browsers available today. Most of the ‘geeks’ are using it for a very long time and now a significant portion of general public too! Firefox ships with a built-in password manager; a blessing for users by enabling them safely store and manage a number of passwords. In general as soon as we type in the username and password in a website and click the signin button Firefox will offer an option to save the entered login credentials.

The only problem is that for secure / HTTPS (SSL encrypted) webpages this won’t happen! In addition to that web forms can be programmed to disable the Auto Complete feature (using autocomplete=”off”) .  Since Firefox is compliant to this standard it won’t offer to save the passwords. Now how can we force Firefox to offer the Remember Password option?

  1. Close all Firefox Windows.
  2. Navigate to the Firefox installation folder and open the file nsLoginManager.js using your favorite text editor like notepad.  In general, the path should be:
  3. C:\Program Files\Mozilla Firefox\components\nsLoginManager.js

  4. Search for _isAutocompleteDisabled : function (element) {.  The code should look like this:
  5. _isAutocompleteDisabled : function (element) {

    if (element && element.hasAttribute("autocomplete") &&

    element.getAttribute("autocomplete").toLowerCase() == "off")

    return true;

    return false;

    },

  6. Delete or comment the three lines after the searched line.
  7. _isAutocompleteDisabled : function (element) {

    //if (element && element.hasAttribute("autocomplete") &&

    //element.getAttribute("autocomplete").toLowerCase() == "off")

    //return true;

    return false;

    },

    OR

    _isAutocompleteDisabled : function (element) {

    return false;

    },

  8. Save the file and close the text editor.

Once the above steps are completed, Firefox will prompt the Remember Password option for all the HTTPS sites and forms where Autocomplete is set as ‘off’.

Note:- Please note that secure websites are designed to deny password saving for a reason! Such webpages are mostly be login pages (e.g. online banking sites, paypal etc.) and if the login credentials are compromised it can do a lot of harm. It is advised to keep this option disabled unless you know what you are doing.

Update (23 March 2011)

This trick won’t work directly in Firefox 4 because of the changes in the file structure. i.e. The file C:\Program Files\Mozilla Firefox\components\nsLoginManager.js is no longer present. The following steps must be performed to find it!

1. Open the Firefox installation directory and find the file:

C:\Program Files\Mozilla Firefox\omni.jar

2. Carefully take a copy of this file and save it in a directory like Documents or Desktop.

3. Rename is the C:\Program Files\Mozilla Firefox\omni.jar file to something like C:\Program Files\Mozilla Firefox\bak_omni.jar just in case something went wrong. Make sure that all Firefox windows are closed before doing this step.

4. Go to the directory where the file omni.jar is copied in step 2 and extract it to a folder omni using any zip extracting tool like Winzip or WinRAR or 7-zip. If required, rename the file extension to zip (i.e. omni.zip).

5. Now you can find and perform the changes in the omni\components\nsLoginManager.js file. Once completed save the file.

6. Now use your zip extracting tool to create a Zip file of all the contents of the omni directory. It should be created as omni.zip.

7. Rename the omni.zip file to omni.jar and copy it to the Firefox directory C:\Program Files\Mozilla Firefox.

All set!

{ 13 comments… read them below or add one }

Phunsuk Wangdu

1 September 21, 2010 at 1:48 am

Is there a way to achieve similar results in IE8? I have been going crazy trying to figure out something similar for IE8 for secure websites. Thanks!

Reply

Joel Gutierrez

2 September 22, 2010 at 7:53 am

I have the same question as Phunsuk. I have a particular secure site that I must log into many, many times a day. Sure would be nice if there were a way to achieve this with IE, I do not believe installation of Firefox is an option for my work PC.

Reply

Strider

3 March 23, 2011 at 11:14 pm

I’m not aware of any such hacks for IE8 or IE9. Firefox’s relatively open structure is making this change possible while all the functions in IE are locked in complied binaries.

Reply

Japtastic

4 November 30, 2010 at 11:15 pm

Nice one! Works perfectly 🙂

Reply

js

5 March 27, 2011 at 1:49 pm

Can not open file ‘C:\Users\Ginxxie\Desktop\omni – Copy.zip’ as archive.

this is where it fails. win7 FF4

Reply

scar

6 February 16, 2012 at 11:57 am

i couldn’t get this to work with FF 10. i found the nsLoginManager.js file inside omni.ja and updated it, but it doesn’t seem to have any effect. fortunately, i found this add-on which does the trick: https://addons.mozilla.org/en-US/firefox/addon/remember-passwords/

Reply

Fred

7 March 10, 2013 at 5:20 pm

Firefox now remembers passwords for https sites. I’m on Firefox 14, and secure site passwords are remembered. I never touched any Firefox settings to make that happen.

Reply

sergio

8 April 28, 2013 at 4:15 am

Michael Lueck

9 June 24, 2013 at 10:38 pm

Thank you for the autocomplete memory jog. Using Firebug, I could remove that bit from the page HTML, and Firefox Password Manager asked if I wanted to save the ID/pw for the site.

Reply

Rocko262c

10 May 1, 2014 at 12:11 pm

Dear Everyone,

Any ideas how to do this in Firefox ESR 24.0 (2014)?

Thanks for your kind help.

Rocko262c

Reply

Angstromm

11 May 6, 2014 at 12:44 am

The omni.jar file no longer exists in the latest iterations of FF. There’s an omni.ja file, but that won’t open as an archive (with 7-zip, even renaming to omni.zip).

An update on how to accomplish this would be hugely appreciated…

Reply

Richard Clapp

12 December 30, 2014 at 12:43 pm

It is still a zip file. Change name of the copy to extension .zip. Though the lines above are missing. Don’t know the code well enough, but looks like this module may have seen a recent redesign.

I used Latest WinZip to open.

Reply

David XXX

13 November 20, 2014 at 12:09 am

On Firefox 33.1 This tricks not working……….. remember password it’s useless for me…

Reply

Leave a Comment

Previous post:

Next post: