Get Firefox to ignore HTML 5 autocomplete tag setting?

15

2

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?

user743115

Posted 2011-06-27T13:08:17.420

Reputation:

Answers

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

Spudley

Posted 2011-06-27T13:08:17.420

Reputation: 198

@user743115: 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, Greasemonkey 2.2 and current script on Magento Backend CE 1.9.0.1 – user620965 – 2014-09-18T11:23:59.870

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. – Tomáš Kafka – 2019-01-23T16:01:59.523

3Because 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. – None – 2011-06-27T14:17:07.860

And yes, we have automated testing, but not everything can or should be automated. – None – 2011-06-27T14:17:17.830

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. – None – 2011-06-27T14:28:02.020

@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. – None – 2011-06-27T15:06:44.827

2

ANSWER @Spudley comment: The Greasemonkey script lead me to this:

http://downloadsquad.switched.com/2005/08/29/skip-login-pages-with-greasemonkey-scripts-todays-browser-tip/ with a link to the script "AllowPasswordRemembering" which overrides the autocomplete=off flag. This works. Thanks!

– None – 2011-06-27T15:16:28.270

11What 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 – 2011-12-12T14:09:14.230

11

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.

fanf42

Posted 2011-06-27T13:08:17.420

Reputation: 231

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 – 2014-09-18T11:21:32.957

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 – 2015-07-29T10:40:41.990

You can also just double click "autocomplete" and press the delete key to just delete the whole attribute. – Matthew Lock – 2014-02-04T12:24:31.180

5

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.

A.K.

Posted 2011-06-27T13:08:17.420

Reputation: 51

Looks like Firefox 32.0.1 sets password save security guidelines on load. Changes via Javascript do not get into account anymore. – user620965 – 2014-09-18T11:33:41.200

Works like a charm ... ty very much. – Yamodax – 2013-03-06T11:07:01.287

that's a simple and easy solution! (although I had to change 'form' by 'input' for the only website I checked so far) – Kevin – 2014-02-07T09:28:49.377

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.

user116009

Posted 2011-06-27T13:08:17.420

Reputation: 21

This does not work in Firefox 32.0.1 – user620965 – 2014-09-18T11:29:38.037

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 – 2019-03-29T11:01:13.163

This does not work with Firefox 17 – Ben – 2012-12-27T03:27:09.613

1

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

SeanDowney

Posted 2011-06-27T13:08:17.420

Reputation: 111

Your addon link is down. – user620965 – 2014-09-18T11:32:10.627

Indeed it is! User Scripts bit the bucket! Here is a mirror: http://userscripts-mirror.org/scripts/show/36242.html

– SeanDowney – 2014-10-21T22:08:44.603

You can host it on greasyfork.org – cprn – 2019-03-29T11:02:22.937

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.

RomanSt

Posted 2011-06-27T13:08:17.420

Reputation: 7 830

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 – 2014-09-18T11:22:43.180