autocomplete=”off” on password fields

This is one of those HTML tricks that I didn’t know about, but I’m sure I can see using in the future. By adding the non-standard attribute autocomplete=”off” to a password input field the browser shouldn’t fill in a password automatically. Of course, being a non-standard attribute not every browser will support it fully.

Have to say that this is one of the good non-standard things that Microsoft has introduced to web browsers.

And a quick example…

HTML:
  1. <form action=“whatever.php”>
  2. <input name=“username” type=“text”>
  3. <input name=“password” autocomplete=“off” type=“password”>
  4. <input value=“Login” type=“submit”>
  5. </form>

Question, Comments...

Do you have more questions. Please either leave a comment below or join us in our new forum.

Leave a Reply