Re: Is "breaking the Web" with HTML 5 a non issue?

Justin James wrote:
> Thanks!
> 
> This seems like less than ideal behavior. What is the point of DOCTYPE if
> UAs don't make any kind of decisions based upon it?

There isn't much of one; it's a talisman.  Certain doctypes put layout 
engines into "Standards mode", rather than "Quirks mode".  <!DOCTYPE 
html> is the shortest string that triggers standards mode in all 
browsers, which is why it's the HTML5 doctype.  Browsers have never 
switched how they behave based on the version of HTML being used, and 
none of them intend to.

> I think this might be a very good time, then, to propose that the HTML 5
> spec state clearly that text/html content should be parsed as HTML 4 unless
> there is a valid HTML 5 DOCTYPE within the document (whatever the HTML 5
> DOCTYPE is, it seems to change or be under debate).   I believe that to free
> ourselves of the concerns of backwards compatability, as well as not
> accidentally break any pages, would be more than worth it, especially since
> all you would be asking UAs to do is have a simple two-way toggle at the
> beginning of their parse routines.
> 
> Thoughts? Am I off my rocker?

In short, yes; the suggestion to junk backwards compatibility is the 
polar opposite of how the spec (and the Web!) has been developed to 
date.  HTML5 is a specification of how to handle text/html and 
application/xhtml+xml documents, not how to handle a subset of text/html 
with a certain magic string at the beginning.

To have an "HTML 5" mode and a "non-HTML 5" mode would be roughly 
equivalent to shipping two web browsers (parsers, DOM implementations, 
...), something which most browsers are not interested in doing (IE 
being the exception).  Not to mention that saying "parse stuff without 
this doctype according to this other specification, which specifies no 
usable parsing rules" is not useful to anyone in the slightest.

a.

Received on Monday, 22 September 2008 16:48:06 UTC