[whatwg] Comments before the DOCTYPE (warning message in validator.nu)

Leif Halvard Silli xn--mlform-iua at xn--mlform-iua.no
Fri Feb 3 17:20:20 PST 2012


If one tries to validate

<!----><!DOCTYPE html><title></title>

then validator.nu gives this warning:

]]
Warning: Comments seen before doctype. 
Internet Explorer will go into the quirks mode.
From line 1, column 1; to line 1, column 7
<!----><!DOCT
[[

While I take some responsibility for this warning, the text ought to be 
more precise. Firstly, because IE10 will not go into quirks mode by 
comments before the DOCTYPE anymore. And, secondly, because IE8 and IE9 
*could*, via the X-UA-Compatible directive, be directed to not go into 
quirks mode - or even simply ignore the entire comment if it belongs to 
Microsoft's proprietary Conditional Comments subset — see 
http://xn--mlform-iua.no/blog/no-condition-comments.

Hence, I would suggest that e.g. "some versions of Internet Explorer 
risk entering quirks-mode" would be a more truthful message to send.
-- 
Leif Halvard Silli


More information about the whatwg mailing list