The autocomplete Attribute

The Current State of HTML5 Forms

<form autocomplete="off">
  <input type="text" name="name" autocomplete="off">

Live Demo


 


Firefox
4+

Safari
5.2+

Safari
iOS 6+

Chrome
14+

Opera
10.6+

IE
11+

Android
2.3-

The Low Down

For browsers with a form complete feature, the autocomplete feature set to “off” can prevent a specific field from being auto-filled. Example: a form might ask for a pet’s name. It is likely that the field will auto-fill incorrectly and cause problems.

  • There is no visual difference between supporting and non-supporting browsers and operating systems.
  • For browsers with a form complete feature but without support the autocomplete attribute, the field could still be auto-filled. This, of course, is rrrelevant for browsers that did not have a form complete feature (e.g. Mobile Safari 5)
  • Values include “on” and “off”
  • Spec says to default to “on”
  • Possibly useful for extra security on password fields
  • Seems to even prevent things like 1Password
  • Relevant mostly for input types that allow for data entry including the date types, text, search url, tel, email, password, number and, oddly, both range and color. Not relevant for file, hidden, checkbox, radio and the three button types.

Our Cookie Policy and Privacy Policy outline how we use cookies to help personalize content, tailor and measure our marketing, and improve your user experience. I agree to use of cookies for these purposes.