Get Firefox to ignore HTML 5 autocomplete tag setting?

114

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

Solution 2

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.

Solution 3

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.

Solution 4

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.

Solution 5

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:
114

Related videos on Youtube

Kaushik
Author by

Kaushik

Updated on September 18, 2022

Comments

  • Kaushik
    Kaushik over 1 year

    I have an xml file which consists of "File Id" attribute which denotes the file id of some pdf document.

    <StoredDocumentRepresentation>
    <DigitalFile FileId="3BSE077611_B001.pdf" xlink:href="files/3BSE077611_B001.pdf" xlink:type="SIMPLE"></DigitalFile>
    </StoredDocumentRepresentation>
    

    There will be many pdf with different FileId(pdf will be having FileId as their name)in the Receive Location. I need to pick the pdf with File id mentioned in the xml... Thanks in Advance

    • Quentin Hayot
      Quentin Hayot almost 9 years
      What's your issue ? Parsing the XML ? Please be more specific.
    • Kaushik
      Kaushik almost 9 years
      I need to pick the pdf file based on the File Id mentioned in the xml...each pdf files are saved with some File Id and this file id will be mentioned in the xml file...
    • Dijkgraaf
      Dijkgraaf almost 9 years
      So what have you tried so far?
    • Kaushik
      Kaushik almost 9 years
      Thanks for your interest Dijkgraaf..
  • Admin
    Admin almost 13 years
    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.
  • Admin
    Admin almost 13 years
    And yes, we have automated testing, but not everything can or should be automated.
  • Admin
    Admin almost 13 years
    @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.
  • Admin
    Admin almost 13 years
    @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.
  • Admin
    Admin almost 13 years
    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!
  • RomanSt
    RomanSt over 12 years
    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>
  • Ben
    Ben over 11 years
    This does not work with Firefox 17
  • Yamodax
    Yamodax about 11 years
    Works like a charm ... ty very much.
  • tvt173
    tvt173 over 10 years
    You can also just double click "autocomplete" and press the delete key to just delete the whole attribute.
  • Kevin
    Kevin over 10 years
    that's a simple and easy solution! (although I had to change 'form' by 'input' for the only website I checked so far)
  • user620965
    user620965 over 9 years
    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
    user620965 over 9 years
    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
    user620965 over 9 years
    @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
    user620965 over 9 years
    This does not work in Firefox 32.0.1
  • user620965
    user620965 over 9 years
    Your addon link is down.
  • fanf42
    fanf42 almost 9 years
    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?
  • Tomáš Kafka
    Tomáš Kafka over 5 years
    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.
  • cprn
    cprn about 5 years
    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
    cprn about 5 years
    You can host it on greasyfork.org
  • Jim Fischer
    Jim Fischer almost 4 years
    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.