There are a few methods to get around autocomplete=off in a website’s forms. One is to permanently disable the feature in firefox that checks for this tag.
Permanently disable the feature in FF
- Navigate to the “components” folder in the firefox installation directory (default for windows: C:\Program Files\Mozilla Firefox\).
- Open “nsLoginManager.js” in notepad or some other simple text editor.
- Find the function “_isAutoCompleteDisabled”, and comment the lines out by adding two forward slashes before each line (see below).
/*
* _isAutoCompleteDisabled
*
* Returns true if the page requests autocomplete be disabled for the
* specified form input.
*/
_isAutocompleteDisabled : function (element) {
// if (element && element.hasAttribute(“autocomplete”) &&
// element.getAttribute(“autocomplete”).toLowerCase() == “off”)
// return true;return false;
},
- Save and close the file, and restart firefox.
Javascript Method
The second method is to use a ‘bookmarklet’ that runs some javascript that does this for you. There a many of these available, but here is an example:
javascript:(function(){var%20ca,cea,cs,df,dfe,i,j,x,y;function%20n(i,what){return%20i+”%20″+what+((i==1)?”":”s”)}ca=cea=cs=0;df=document.forms;for(i=0;i<df.length;++i){x=df[i];dfe=x.elements;if(x.onsubmit){x.onsubmit=”";++cs;}if(x.attributes["autocomplete"]){x.attributes["autocomplete"].value=”on”;++ca;}for(j=0;j<dfe.length;++j){y=dfe[j];if(y.attributes["autocomplete"]){y.attributes["autocomplete"].value=”on”;++cea;}}}alert(“Removed%20autocomplete=off%20from%20″+n(ca,”form”)+”%20and%20from%20″+n(cea,”form%20element”)+”,%20and%20removed%20onsubmit%20from%20″+n(cs,”form”)+”.%20After%20you%20type%20your%20password%20and%20submit%20the%20form,%20the%20browser%20will%20offer%20to%20remember%20your%20password.”)})();
{Credit squarefree for javascript function}
You can either copy and paste this in your URL bar, or save the script as a bookmark. When you come upon a site that you can’t save a password for, use the code above, then login as normal, and you should see the option to save the password.
This was tested in Firefox 3.0.10, and worked great.
#1 by XuluWarrior on February 10th, 2010
Quote
I have recently been annoyed by this problem and ended up writing a Jetpack that allows you to selectively override the autocomplete settings of fields. You can get hold of it at http://jetpackgallery.mozillalabs.com/jetpacks/339
Let me know if it works for you as I have only managed to test it on a couple of sites so far.
#2 by brett on February 10th, 2010
Quote
I tried out your jetpack but it didn’t work for me. I’m using FF 3.5.7.
#3 by XuluWarrior on February 12th, 2010
Quote
How do you mean it didn’t work? It didn’t install or when it installed it didn’t do what you expected?
If it didn’t work as expected on a particular website, point me towards the site and I will try it out. As I said, I’ve only managed to try it on sites that I use.
#4 by brett on February 12th, 2010
Quote
It installed fine. I right-clicked, then clicked Remember Me (if I right-click again, it says forget me, so i assume that part worked ok). Then I log in, but it neither asks me if I want it to remember nor remembers if for me next time I visit the site. The site I tested it on you won’t be able to access, but I’ll have to try again on a site that is publicly accessible and let you know.
#5 by XuluWarrior on February 12th, 2010
Quote
Take into account that if you want it to remember a username/password, you need to tell it to remember both fields.
Also the autocomplete functionality requires the fields to have ‘id’s. I have made a hack so that for websites that still insist on using the ‘name’ attribute, RememberMe adds the ‘id’ onto the field for you. However, if the fields have neither attribute its not going to work. I would have to do something really hacky for that.
#6 by DChen on August 27th, 2009
Quote
How to do it permanently in Chrome?
#7 by brett on February 10th, 2010
Quote
I don’t know how to do it in chrome. You might be stuck with the bookmarklet (if that works).