If you use the password manager built into your browser for remembering all your web logins, or are considering it in light of the recent events with LastPass, you have (or will) inevitably come across certain sites which simply will not allow you to save your password. However, with a simple click or two of your mouse, you can work around this limitation and force your browser to remember the password on these uncooperative sites.
Editor’s Note: of course, if you’re using LastPass, this functionality is built right in. This article is for those that prefer to use the built-in browser password saving instead of putting their passwords in the cloud.
Why won’t some sites allow me to save the password?
This answer is quite simple, it is due to the “autocomplete” attribute on form and/or input elements being set to “off”. This attribute was introduced by Internet Explorer 5 and does what its name suggests, prevents auto-complete functionality from applying to any field which has it explicitly turned off.
As you can see here on PayPal’s site (which does not allow you to save your password), the login section has the autocomplete value set to off for the password field. As a result, the browser will not pick up this field for its auto-complete password database.
The Fix: A Simple JavaScript Function
Fortunately, the fix is equally as simple. We merely need to change the value of this attribute, wherever it is present, to “on”. Thanks to the ability of JavaScript to manipulate the DOM (document object model), you can easily do this with the click of a bookmark.
The JavaScript function is embedded in the link below. You can either drag the link to your bookmark bar or right-click on it and bookmark the target link. Once this is done, simply clicking on the bookmark will run the “Allow Password Save” script on the current page.
If the link above doesn’t work then here is the source for the link. You can create a bookmark with the following as it’s source URL:
From our testing (using PayPal as the test site), this worked as expected in Firefox 4 and in Internet Explorer 9. Unfortunately, we could not get it to work within Chrome despite the success message that autocomplete was enabled.
The procedures for using it are almost identical in each browser with Internet Explorer requiring one additional step.
Usage in Firefox
When you visit a site that does not allow you to save your password, run the “Allow Password Save” script. You should see a notification like the one below.
Enter your user name and password like normal and upon logging in, you will be prompted to save your password.
The next time you visit the page, your user name will be filled in automatically, but not the password. In order for the password to be auto-filled, you first have to put the focus in the user name field. You can use either a mouse click or Ctrl + Tab if the password field has focus.
Now when you move the focus from the user name field either with a click or Tab, your password will automatically fill in.
Usage in Internet Explorer
When you visit a site that does not allow you to save your password, run the “Allow Password Save” script. You should see a notification like the one below.
Enter your user name and password like normal and upon logging in, you will be prompted to save your password.
The next time you visit the page, your user name will be filled in automatically, but not the password. You will need to run the “Allow Password Save” script again and you should see the same notice as above.
In order for the password to be auto-filled, you first have to put the focus in the user name field. You can use either a mouse click or Ctrl + Tab if the password field has focus.
Now when you move the focus from the user name field either with a click or Tab, your password will automatically fill in.
JavaScript Source
If you are curious how the script works, here is the well formatted and commented source. Feel free to modify it as you see fit.