This question already has an answer here:
- Disabling Chrome Autofill 69 answers
How can we disable Chrome's autofill feature on certain <input>
s to prevent them from being automatically populated when the page loads?
At the same time I need to keep autocomplete enabled, so the user can still see the list of suggestions by clicking on the input or typing in it. Can this be done?
EDIT: Feel free to use plain Javascript or jQuery if you feel it is necessary or you feel like it would make your solution simpler.
I don't like to use setTimeout in or even have strange temporary inputs. So I came up with this.
Simply change your password field type to text
And when the user focus that input change it again to password
Its working using latest Chrome (Version 54.0.2840.71 (64-bit))
Easiest solution, provide a value of ' ' for the username field (which you can still call 'username').
If the value can be populated by user-inputted values, as is usually the case for a form that you are validating, provide a value of ' ' when it is not already set. In PHP,
I actually think autocompletion for username and password effectively gifts access to all your accounts to anyone who accesses your computer, regardless of how obscure your passwords are...
A bit late to the party... but this is easily done with some jQuery:
Pros
Cons