Html – Disable autocomplete in chrome 66

autocompletegoogle-chromehtml

Is there any way to disable autocomplete on a text field in chrome 66?
I have tried a number of options like :

  1. autocomplete="off"
  2. autocomplete="false"
  3. autocomplete="disabled"
  4. autocomplete="something-new"
    etc.

Can anyone help me with this?

Also, one more thing does chrome automatically enables autocomplete for a username if it has a password type field below it?

Best Answer

I used this code and it is working for me. I hope it will also helpful for you. :) Enter your type with readonly and then below mention code.

<input readonly type="email" onfocus="if (this.hasAttribute('readonly')) {
    this.removeAttribute('readonly');
    this.blur();    this.focus();  }" />