0

Currently I am thinking which way is best for clearing username and password fields that have been autocompleted or filled in IE. Problem doesn't happen in Chrome or Firefox. Values don't let user to navigate further in Wizard because of ASP.NET validators.

I have read that autocomplete="off" does not work reliably in modern some browsers. Therefore I am leaning to using javascript like document.getElementById("Username").value = "";.

If this is best way, should it be in window.onload or is it too early and autocomplete magic happens after it? When is the best time to execute the emptying? Is there better way to handle this?

edit: I am forced to use HTML4.01 in this case. As far as I know autocomplete is HTML5 supported attribute.

veix
  • 39
  • 9
  • _"I have read that autocomplete="off" does not work reliably in modern browsers."_ - where did you read this ? I think all the modern browsers support this attribute – codtex Sep 20 '17 at 07:46
  • @codtex My evidence is not that good but as example [stackoverflow 1](https://stackoverflow.com/questions/3868299/is-autocomplete-off-compatible-with-all-modern-browsers) [stackoverflow 2](https://stackoverflow.com/questions/18208298/does-ie-11-ignore-autocomplete-off) Also I forgot to mention that it is HTML5 attribute and I am forced to use HTML4.01 in this case. I will edit my original post. edit: I have edited my original post. – veix Sep 20 '17 at 07:50

0 Answers0