autocomplete=off is not XHTML compliant

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
 
J

Jesse Houwing

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top