Is there a way of preventing auto-fill of username/password on client browsers? Website has two different account types – one for teachers, one for students. Browsers autofill teacher logins on student area – doesn't let them log in – but causes confusion. I want to prevent browsers doing this.
Disable auto-fill of passwords for Clients
Is there a way of preventing auto-fill of username/password on client browsers? Website has two different account types – one for teachers, one for students. Browsers autofill teacher logins on student area – doesn't let them log in – but causes confusion. I want to prevent browsers doing this.
Good luck with that :D
Seriosly, it is not as easy as you would think.
If you want to prevent autofilling of password fields, you can use autocomplete="new-password".
However, this is a hint, which browsers are not required to comply with.
What I have done in the past is use some javascript on load which sets the value of the password field to an empty string
Thank you so much. We'll give that a go.
Hi Lucy,
Are you using Umbraco form or custom form?
Have you tried attributes like
aria-autocomplete="none"
autocomplete="off"
etcRegards
autocomplete=off is ignored by chrome
Hi Huw,
Yes, I've checked this and understand Chrome ignore this attribute now!
Finally I was able to avoid this issue by adding autocomplete="username", autocomplete="new-password" to the respective fields.
Thanks.
autocomplete="new-password" may also get ignored by some browsers unfortunately :(
Thank you for all your suggestions here – and for letting me know about the browsers ignoring different attributes – particularly annoying.
is working on a reply...