A few years ago we wrote about a handy bookmarklet that would make Firefox remember passwords on some sites that ordinarily wouldn’t, like Yahoo! or Paypal. Some people on the article were reporting that this no longer works in Firefox 3, but one anonymous commenter referenced a rather clever workaround.

The trick requires the modification of a JavaScript file that Firefox uses for managing login-related tasks. Once the workaround is applied Firefox will start ignoring any attributes in the login forms that try to tell the browser not to remember a password. You’ll still be able to choose whether or not you want a password remembered for a particular site, but at least now the choice will be left up to you.

First things first. We need to open the nsLoginManager.js file in a text editor. The location of the file is a bit different depending on what OS you’re using:

  • Windows:

    You’ll find the file in the components folder where Firefox was installed:

    C:\Program Files\Mozilla Firefox\components\nsLoginManager.js

  • Mac:

    Find Firefox in your Applications folder, right-click on it, and choose the option to Show Package Contents. Then within the Firefox.app navigate to the file:


Alright. This is where my instructions get a little different than what’s provided by the person who found this workaround. They want you to remove a few lines of code from this file, but all you really need to do is flip a value from true to false. That way it’s a lot easier to revert back to the file’s original state should you ever need to.

Now you need to perform a search on the file for:


You should be taken to a section of the file that looks something like this:


You’ll notice that I’ve highlighted line number 770 (your line number may be different), and it says:

return true;

You need to change that to say:

return false;

It should now look like this:


Save the changes to this file, and then restart Firefox. Now when you go to a site like Paypal you should see a prompt to save the password just like it does for most other sites:


The only downside to this trick is that you may need to re-apply it after updating or reinstalling Firefox. Other than that it works great, and is a little nicer than the bookmarklet since it doesn’t require any additional interaction after being set up.