Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Why Doesn't AutoComplete Always Work in Firefox?

If you're the type of person that always allows Firefox to save your login credentials for the sites you visit, you might be very frustrated when you come across a site that doesn't even prompt you to save the credentials. We've got the lowdown on what's going on here.

Here's that awful form I have to type into almost every day… I'm really getting tired of it.

image

So I take a look into the source for the page, and here's the culprit: the AUTOCOMPLETE="off" on the form will tell Firefox to disable auto completing for that form. The form elements themselves also have the same tag on them.

image

You'll find this happens quite often on corporate vpns, banks, and other sites where they are worried about security and don't want you to save your passwords, so they use this tag in their pages to prevent your browser from saving the credentials.

Your Best Option: Greasemonkey it!

You can use a greasemonkey script to re-enable the autocomplete on the form elements. You can find a number of them at userscripts.org:

http://userscripts.org/scripts/search?q=autocomplete

Or you can write your own if you feel like it… for some reason the other scripts did not work on my screwy corporate vpn at work, so I created a new script that manually set the attributes of each.

var frm = document.forms[0];
frm.setAttribute('autocomplete', 'on');
frm.elements[0].setAttribute('autocomplete', 'on');
frm.elements[1].setAttribute('autocomplete', 'on');

Hint: the Firebug extension is a great way to figure out what the elements are if you are writing a script.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 08/4/07 and tagged with: Firefox, Firefox & Internet

Comments (2)

  1. What is Firefox?

    This site shows how to add autocomplete=off sites to the password manager without needing greasemonkey:
    http://dotancohen.com/howto/fi.....anager.php

  2. Garga L

    Just make a bookmark with this in the location field, and when a page won't let you autosave, click this bookmark and it will remove the restrictions. Fill out the form and Firefox will ask to save the info for you.

    javascript:(function(){var ca,cea,cs,df,dfe,i,j,x,y;function n(i,what){return i+%22 %22+what+((i==1)?%22%22:%22s%22)}ca=cea=cs=0;df=document.forms;for(i=0;i


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.