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

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

--- Comment #21 from Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> 2011-02-18 19:43:45 UTC ---
(In reply to comment #20)
> (In reply to comment #19)

> > Hypothetical! With many if's. Such as: if <!----><!DOCTYPE html> didn't 
> > trigger quirks mode, would the meta switch still have existed/been relevant?
> 
> Definite yes. There is no relation of the two problems (except the noted side
> effects). The meta switch is the author level tool Microsoft created so
> websites can opt in to any mode IE defines.

Apart from desire to "be valid", one usecase that "X-UA-COMPATIBLE inside a
conditional comment before the DOCTYPE" could support would be the -
hypothetical - need to trigger different modes in different versions of IE. For
example ...

<!--[if ie]>
 <![if IE 7]><!--quirks--><![endif]>
 <![if IE 9]>
<meta content="IE=8" http-equiv="x-ua-compatible"/>
 <![endif]>
 <![if IE 8]>
<meta content="IE=7" http-equiv="x-ua-compatible"/>
 <![endif]>
<![endif]-->
<!DOCTYPE html>

(I don't know if it has negative side effects - e.g. on the page load. Or
whether there are other ways to achieve the same thing, for example via HTTP.)

In contrast, the most *typical* use of  X-UA-COMPATIBLE would probably be the
opposite: rather that differentiation, make all versions of IE behave as IE7,
for instance. 

That said: a content-model-restriction in HTML5 wouldn't hinder you from,
validly, using this trick in HTML4 and XHTML1.

> > Through the concept "restrictions on the content model", HTML5 is able to
> > discern between things that are forbidden for practical reasons and other 
> > kindsof forbiddance. Thus, if the practical reason for forbidding
> > <!----><!DOCTYPE html> would disappear, then e.g. HTML6, could lift the ban.
> 
> I see, that makes sense.

It is great if we are nearing the same standpoint!

-- 
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 Friday, 18 February 2011 19:43:51 UTC