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?

link|improve this question
feedback

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

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

3 Answers

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

link|improve this answer
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
1  
@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
@spudley - Too many projects with too many autocomplete flags (legacy and new) to add environment flags for our environment for this (i.e. too much work with too little value to get buy in). I thought there might be some plugin or config setting I was unaware of that would just override this flag and make it easy. I will check out Greasemonkey options. – user743115 Jun 27 '11 at 15:06
1  
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
show 1 more comment
feedback

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown