22

With HTML 5 there is a new attribute called autocomplete. If it's set to autocomplete=off, then the browser does not store the password.

How can I override this setting, short of modifying the source code of Firefox and recompiling it? Is there maybe a Firefox about:config option I am overlooking that I can toggle - an "ignore:autocomplete" or something?

6 Answers 6

1

The whole point of autocomplete=off is to provide some level of security for fields which require it. If a site designer has deemed that a field requires autocomplete=off, then there's a good chance that he means it. Why do you want to turn it off?

Short answer: No, there isn't a way to disable it. It's considered a security feature.

(by the way, autocomplete=off has been a feature in various browsers for ages... it may only have been made formally part of HTML as of HTML5, but it's been in use for a very long time, so I wouldn't consider it 'new')

8
  • 4
    Because as part of a security audit we have to add autocomplete=off to all our logins in order to pass the audit. This is a real pain for all of our project development and testing teams. Their is no need to have it off in dev or test, but at the same time it would be ridiculous to have an environment switch on this on all of our products. Many of our QA are rightly complaining about having to login. We have multiple customers with custom features, so logging in and out between customers frequently is needed for testing. With this turned off it has noticeably slowed our testing.
    – user743115
    Jun 27, 2011 at 14:17
  • 2
    @user: so why not have a flag in your code which you can switch on that triggers whether the site serves the autocomplete flag? development-specific flags for testing are not an unusual thing to have in an app. Or change the passwords in the QA environment. Or write a Greasemonkey script to give you a quick-login button for each user. There's plenty of ways around this that don't involve hacking Firefox.
    – Spudley
    Jun 27, 2011 at 14:28
  • 2
    ANSWER @Spudley comment: The Greasemonkey script lead me to this: downloadsquad.switched.com/2005/08/29/… with a link to the script "AllowPasswordRemembering" which overrides the autocomplete=off flag. This works. Thanks!
    – user743115
    Jun 27, 2011 at 15:16
  • 13
    What a moronic security feature. If saving passwords is too risky, then don't support it at all. If it's not too risky, then always allow it. Why on Earth is this down to web developers? What do THEY have to do with this decision? </rant>
    – RomanSt
    Dec 12, 2011 at 14:09
  • 1
    Browser is an user agent. That is, an agent that acts in the service for the user, on user's computer. Not for the website. Jan 23, 2019 at 16:01
12

There is an other way to make firefox remember the password thanks to Firebug: just change the value of autocomplete to "on", and save the form. Firefox will show the "remember" pop-up as usual.

Details are given here:

  • install Firebug
  • on the page with the faulty password field, open Firebug.
  • use the blue mouse pointer in Firebug toolbar to select the password field on the Firebug HTML tab, you should have a field selected
  • double-click on "off" to edit the value and change it to "on".
  • Now, enter you login/password as usual in the page form
  • when you hit "submit", Firefox should display the notification pop-up that allows to remember the login/password for that site.

Now, each time you are going to go on that page, firefox will autocomplete the login/password as usual.

3
  • You can also just double click "autocomplete" and press the delete key to just delete the whole attribute. Feb 4, 2014 at 12:24
  • Do now work anymore. (You got some vote ups, so i think i may have worked in the early days). Tested with Firefox 32.0.1, Firebug 1.11.1 / 2.0.4, Firefox Developer Tools on Magento Backend CE 1.9.0.1.
    – user620965
    Sep 18, 2014 at 11:21
  • It seems to still be working in Firefox 39 on my side. I'm now using the "right click -> inspect element (Q)" built-in feature of Firefox, but process is the same: edit the code to remove or enable the autocomplete tag, enter login & password and click ok, and Firefow shows the "would you like to remember password". Have you a site no working for you where I could test?
    – fanf42
    Jul 29, 2015 at 10:40
6

The following bookmarklet makes all forms on this page autocompletable:

<a href="javascript:(function(){var fm=document.getElementsByTagName('form');for(i=0;i<fm.length;i++){fm[i].setAttribute('autocomplete','on');}})()">Autocomplete on</a>

Just put the above into an HTML file, visit it with your browser, drag the "Autocomplete on" link to your bookmarks toolbar, visit the page with the offending form, and click on the "Autocomplete on" bookmark to make form remember your entry.

4
  • Works like a charm ... ty very much.
    – Yamodax
    Mar 6, 2013 at 11:07
  • that's a simple and easy solution! (although I had to change 'form' by 'input' for the only website I checked so far)
    – Kevin
    Feb 7, 2014 at 9:28
  • Looks like Firefox 32.0.1 sets password save security guidelines on load. Changes via Javascript do not get into account anymore.
    – user620965
    Sep 18, 2014 at 11:33
  • For the Internet beginners out there, one additional step is required. After you "click on the 'Autocomplete on' bookmark to make the form remember your entry," you then need to click on the browser's back button to reload the page with the offending form. When the page is reloaded, the browser should now fill in the user name and password fields from your browser's password vault (assuming you previously saved your user name and password for the webpage in the password vault). NB: You might need to manually save your user name and password in the browser's password vault. Jul 13, 2020 at 19:21
2

The easiest way to do this is:

locate the nsLoginManager.js file under the "Mozilla Firefox" folder, such as:

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

locate the function

_isAutocompleteDisabled :  function (element) {
        if (element && element.hasAttribute(”autocomplete”) &&
            element.getAttribute(”autocomplete”).toLowerCase() == “off”)
            return true;

return false;
},

now change the first return from true to false such as this:

_isAutocompleteDisabled :  function (element) {
        if (element && element.hasAttribute(”autocomplete”) &&
            element.getAttribute(”autocomplete”).toLowerCase() == “off”)
            return false;  //This is the line of code that changed.....

return false;
},

Now save this change and restart firefox.

3
  • This does not work with Firefox 17
    – Ben
    Dec 27, 2012 at 3:27
  • This does not work in Firefox 32.0.1
    – user620965
    Sep 18, 2014 at 11:29
  • It's a wrong edit. What you want to do is add "return true;" in the first line of this function, this way autocomplete is always on and no checks are done.
    – cprn
    Mar 29, 2019 at 11:01
2

If you have Firefox you can install Greasemonkey and install this addon which re-enables autocomplete for the form. It's not perfect, but generally it works. For the sites that it does not entirely work for, you can craft a custom grease monekey script

3
1

The addon Auto-Complete On enables autocomplete only for login-related fields, so that credit card numbers and the like still won't be saved (at least in theory).

Given that this add-on is always on, that seems like a good idea. It is a no-restart addon, so in theory you could turn it on only when you need to with relatively easily.

1
  • Do now work anymore. (You got some vote ups, so i think i may have worked in the early days). Tested with Firefox 32.0.1, Auto-Complete On 1.6 on Magento Backend CE 1.9.0.1
    – user620965
    Sep 18, 2014 at 11:22

You must log in to answer this question.