Revamp HTML5 doctype sniffing?

When comparing the doctype sniffing of HTML 5 and Internet Explorer 
versions 6 to 8, you notice that HTML 5 sniffs for more doctypes than IE 
does. That is, many doctypes that trigger Quirks Mode per HTML 5 trigger 
Full or Almost Standards Mode in Internet Explorer.

I think it would be a good decision to make HTML 5 fit IE and not IE fit 
HTML 5.

That's because IE is not only the market leader, but also a product with 
an extremely long life compared to other browsers. Other browsers are 
hardly supported for more than 3 years while IE6 is supported until 2014 
when support for WinXP runs out. So if HTML 5 (thus all non-IE browsers) 
would change, doctype sniffing would be more interoperable not so far in 
the future.

Philip Taylor published doctype usage data [2] in 2007, he also wondered 
what would happen, if those doctype would trigger Standards Mode per HTML 5.

My personal result from testing over hundred different sites is, that 
there would be almost no harm done to those sites, that currently render 
in quirks mode in non-IE browsers.
Most problems I encounter on these pages are also in other browser's 
quirks modes, so there isn't really much harm done.

A discussion about this was started at bugzilla.mozilla.org [2]. Not 
included in the patch there is the string "<!doctype html public>" which 
triggers Full Standards Mode in IE and Opera but not in Safari or Firefox.

[1] http://lists.w3.org/Archives/Public/public-html/2008Feb/0393.html
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=484406

Received on Friday, 27 March 2009 16:43:14 UTC