autocomplete=off is not XHTML compliant

  • Thread starter Thread starter Amil Hanish
  • Start date Start date
A

Amil Hanish

I have a school test site where students enter answers. I want to disable
the auto complete feature. You can do this for IE via autocomplete=off to
the form or input control. But, this is not XHTML compliant. Does anyone
know how to disable this in a XHTML compliant manner?

Amil
 
Hello Amil,
I have a school test site where students enter answers. I want to
disable the auto complete feature. You can do this for IE via
autocomplete=off to the form or input control. But, this is not XHTML
compliant. Does anyone know how to disable this in a XHTML compliant
manner?

Amil

Most of these features can also be controlled by a meta tag or a meta server
header. Not in this case it seems.

Microsoft documents the autocomplete feature here:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/forms/autocomplete_ovr.asp

If you want to stay xhtml compliant, then a solution using Javascript is
probably the easiest solution. Just set the autocomplete property of the
form or the input to off using script, and your HTML will still validate.
http://chrisholland.blogspot.com/2004/11/banks-protect-privacy-disable.html

On the other hand, you could also ignore the warning.

As side note, Firefox does not honour the autocomplete=off tag in all versions.
They do however now recommend to deviate from the xhtml standard and use
the IE tag.
http://developer.mozilla.org/en/doc..._Autocompletion#Original_Document_Information
 
Back
Top