Autocomplete off vs false?

You are right. Setting the autocomplete attribute to “off” does not disable Chrome autofill in more recent versions of Chrome.

However, you can set autocomplete to anything besides “on” or “off” (“false”, “true”, “nofill”) and it will disable Chrome autofill.

This behavior is probably because the autocomplete attribute expects either an “on” or “off” value and doesn’t do anything if you give it something else. So if you give it something other than those values, autofill falls apart/doesn’t do anything.

With the current version of Chrome it has been found that setting the autocomplete attribute to “off” actually works now.

Also, I have found that this only works if you set the autocomplete attribute in each <input> tag of the form.

There has been a response to this ambiguity in the Chromium bug listings here.

Disclaimer: This was found to be true in Chrome version 47.0.2526.106 (64-bit)

Leave a Comment