Create a Website and Make It Profitable

Use Site Build It! to get up and running with your own website, no technical knowledge required, and get ready to cash in on a slice of the giant online advertising industry. Check out Site Build It! to get started.

Free Logo Creator

Logo creation is a long, drawn-out creative process that can cost millions. But a good logo doesn't have to cost a fortune, and you don't even need to hire a professional design team. Check out Logo Creator (Win | Mac) to get started, read our article on obtaining your own Free Logo Creator.



Nov 06 2009

Force Firefox to Save Your Password


Filed under: Software » Security, Web Browsers » Firefox,
Tools:

Force Firefox to Save Paypal Password

Trying to login to Paypal, your bank or credit card account, airline website, Yahoo, MSN, or any number of other online sites and for some reason Firefox doesn't ask you if you want to save your password? So, you have to type it in every time you want to log in. We show you how to force it to remember your passwords.

As far as security is concerned, it's actually a good thing that Firefox doesn't allow you to save your password for these sites, given the prevalence of Firefox on public computers, such as those in libraries, schools, and airports. You wouldn't want someone to sit down behind you, after all, and be able to login to your credit card account with the click of a button.

Bookmarklet to Force Firefox to Save Your Password

It's important that you only use this on a computer you trust, such as your home computer. Here's how it works:

  • Right-click on this link and save it as a bookmark: Force Firefox Save
  • The next time you're on a page that requires you to enter a password, and Firefox refuses to save it, simply load the saved bookmark while on the page, before entering your password.
    • You'll see a confirmation dialog with the following: Removed autocomplete=off from 1 form and from 2 form elements, and removed onsubmit from 3 forms. After you type your password and submit the form, the browser will offer to remember your password.
    • Next, simply login as normal. The difference is that this time, Firefox will offer to save your password. Next time you login, your username and password will fill in automatically

How Does the Force Password Save Bookmarklet Work?

Firefox (and other browsers) are setup so that websites can request the "autocomplete" (password saving functionality) feature to be turned off. That means, when you visit their website, you won't (by default) be able to save a password because of a setting change. Don't forget that this is a reliable security precaution - as mentioned, you don't want to override this setting on a computer you're not familiar with or that is in a public location.

The Force Password Save Bookmarklet (Javascript) Code

That bookmarklet that forces Firefox to turn the "autocomplete" setting back on for specific web pages is executed via Javascript, so your browser must support Javascript for this to work. For the technically minded, or those that are simply curious, here's the code used to make the Javascript bookmarklet:

javascript:(
function() {
  var ca,cea,cs,df,dfe,i,j,x,y;
  function n(i,what) {
    return i+" "+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 autocomplete=off from "+n(ca,"form")+" and from "+n(cea,"form   element")+", and removed onsubmit from "+n(cs,"form")+". After you type your password and submit the form, the browser will offer to remember your password.")
}
)();

How to Make Your Own Bookmarklet?

Bookmarklets are essentially snippets of Javascript code. Just like when you create a bookmark to a page, a URL is stored, and upon recall executed (so your browser is taken to that URL), with a bookmarklet, the URL is a snippet of Javascript. If you bookmark the bookmarklet (hence the name), upon recall the Javascript snippet is executed in your browser. So all you really need to do is copy and paste the above code into the URL field of a link, and you have your bookmarklet. Note that we've inserted tabs and spacing for readability - you may need to remove these (ie. consolidate space) to get the Javascript to work correctly.

Average: 5 (1 vote)
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options

CAPTCHA
This question is used to make sure you are a human visitor and to prevent spam submissions.