The autocomplete attribute and web documents using XHTML: Difference between revisions

Jump to navigation Jump to search
Line 108: Line 108:
If they declare that they are authoring according to a W3C HTML doctype, but use the <code>autocomplete</code> attribute then they are simply generating junk markup (as has always been the case). What they should do is use a custom DTD (as described above). Because of browser support, this is the best option for those who want to use <code>autocomplete</code> for security.
If they declare that they are authoring according to a W3C HTML doctype, but use the <code>autocomplete</code> attribute then they are simply generating junk markup (as has always been the case). What they should do is use a custom DTD (as described above). Because of browser support, this is the best option for those who want to use <code>autocomplete</code> for security.


My suggestion would allow developers to author HTML according to W3C DTDs and disable autocompletion in supporting browsers. This would not require not XSL but a namespaced class attribute like so:
My suggestion would allow developers to author HTML according to W3C DTDs and disable autocompletion in supporting browsers, using a namespaced class like so:


<blockquote><pre><INPUT TYPE="text" CLASS="fh disable_form_history" NAME="sensitive ID="sensitive"></pre></blockquote>
<blockquote><pre><INPUT TYPE="text" CLASS="fh disable_form_history" NAME="sensitive ID="sensitive"></pre></blockquote>

Navigation menu