[Bug 12072] Comments before <!DOCTYPE html> should be forbidden

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12072

Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xn--mlform-iua@xn--mlform-i
                   |                            |ua.no

--- Comment #1 from Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> 2011-02-15 04:35:06 UTC ---
An advantage which a forbidding of comments before the DOCTYPE provides, is
that it would largely kill off X-UA-COMPATIBLE meta elements from  having any
effect in legal HTML5 syntax. 

   BECAUSE:

    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=8"
/><![endif]-->
    must appear *before* the DOCTYPE in order to affect the parsing mode. Only
if used
    "naked" (that is: outside condional comments) does it work *after* the
DOCTYPE.

   THUS for example this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=8"
/><![endif]-->

     causees quirks-mode even in IE8. (And IE9 assumingly works the same.)

     WHERAS this:

    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=8"
/><![endif]-->
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

     causes standards-mode in IE8, despite the transitional DOCTYPE.

This would be an advantage, because X-UA-COMAPTIBLE is only proprietary syntax
and, in general a PIA and a complication for web authors. (If authors doesn't
care about HTML5 validity anyway, then they are of course free to use
X-UA-Compatible.)

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 15 February 2011 04:35:08 UTC