W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2012

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

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Sat, 4 Feb 2012 02:20:20 +0100
Message-ID: <20120204022020384145.299b9d76@xn--mlform-iua.no>
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
Received on Friday, 3 February 2012 17:20:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:11 UTC