Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jun 29 '11 at 3:04

This question came from our site for professional and enthusiast programmers.

6 Answers 6

up vote 2 down vote accepted

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')

share|improve this answer
3  
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 '11 at 14:17
    
And yes, we have automated testing, but not everything can or should be automated. –  user743115 Jun 27 '11 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 '11 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 '11 at 15:16
6  
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> –  romkyns Dec 12 '11 at 14:09

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.

share|improve this answer
    
You can also just double click "autocomplete" and press the delete key to just delete the whole attribute. –  Matthew Lock Feb 4 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 at 11:21

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.

share|improve this answer
    
This does not work with Firefox 17 –  Ben Dec 27 '12 at 3:27
    
This does not work in Firefox 32.0.1 –  user620965 Sep 18 at 11:29

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

share|improve this answer
    
Your addon link is down. –  user620965 Sep 18 at 11:32
    
Indeed it is! User Scripts bit the bucket! Here is a mirror: userscripts-mirror.org/scripts/show/36242.html –  SeanDowney Oct 21 at 22:08

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.

share|improve this answer
    
Works like a charm ... ty very much. –  Shimodax Mar 6 '13 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 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 at 11:33

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.

share|improve this answer
    
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 at 11:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.