Okay, so I know how this autocomplete="off" tag is supposed to work on all inputs except a password field and I have searched for an answer to my specific problem but it looks like I'm the only one with this problem. I know I can add it to the form element or to an individual input-element. My doctype is set as: <!DOCTYPE html>
.
I have a form with 2 questions (simplified for this example): Name and Phone. For testing purposes I have added the autocomplete="off" to both fields AND the form element.
This is my form:
<form id="myform" autocomplete="off">
<input autocomplete="off" type="text" name="name" />
<input autocomplete="off" type="text" name="phone" />
</form>
The form totally ignores the autocomplete="off" and suggests my name and phone number.
Does anybody have any idea?
The solution is actually very simple:
autocomplete="__away"
What we have done is tell any browser to completely ignore the field since __away is an air value - does not exist.
Chrome unfortunately decided to ignore autocomplete="off"
, making it difficult on developers in hopes of maybe making some thing easier for typical users.
...we started ignoring autocomplete=off for Chrome Autofill data
Source: https://bugs.chromium.org/p/chromium/issues/detail?id=468153 (2015)
Is there a solution?
Not really... That comment continues:
In cases where you really want to disable autofill, our suggestion at this point is to utilize the autocomplete attribute to give valid, semantic meaning to your fields. If we encounter an autocomplete attribute that we don't recognize, we won't try and fill it.
But that doesn't seem to work anymore (as of Chrome 53). From the discussion here - Chrome Browser Ignoring AutoComplete=Off - as well as my own testing, there seems to no longer be a way to turn off autofill without using some kind of hack.
Try setting autocomplete="new-password" in the password element. This works for chrome only
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With