W3C home > Mailing lists > Public > public-html@w3.org > April 2009

Re: Revamp HTML5 doctype sniffing?

From: Henri Sivonen <hsivonen@iki.fi>
Date: Mon, 6 Apr 2009 10:20:28 +0300
Cc: public-html@w3.org
Message-Id: <D6FD0840-B3F4-4F77-A734-6CDD419E0BA6@iki.fi>
To: Daniel Schattenkirchner <schattenkirchner.daniel@gmx.de>
On Apr 5, 2009, at 12:55, Daniel Schattenkirchner wrote:

> Ian Hickson wrote:
>> The problem with the modes is their existence at all; unless we can  
>> get rid of a mode entirely, it doesn't really matter how many ways  
>> there are to trigger it. If there is even one way to trigger a  
>> mode, then we haven't gained anything by removing the number of  
>> ways it is triggered, since the cost is in testing the modes once  
>> they are triggered, not in testing the triggering mechanism itself  
>> (which ironically isn't affected by the number of modes or the  
>> number of ways they can be triggered).
> I have a different point of view here. If HTML 4.0 doctypes wouldn't  
> trigger quirks mode, authors were less likely to unintentionally use  
> that mode (I know that this is happening, because I often work with  
> beginners).

How does it happen? Where do they copy and paste from?

At least the first google.com result page for "doctype" includes no  
advice to use the 4.0 doctype regardless of whether the pages  
recognize doctype sniffing or focus on DTD-based validation.

The only hits that even mention a 4.0 doctype are

The former shows an 4.0 doctype as its "typical" annotated doctype  
(email sent to site author) but only lists 4.01 doctypes as "examples".

The latter clearly recommends 4.01 and only lists HTML 4.0 in an  
appendix that lists the behavior for various doctypes.

>> I don't understand what you mean.
> IE 6 to 8 and Opera 9.5/9.6 currently trigger almost standards mode  
> for HTML 4.0 doctypes. IE (8) will remain unchanged for a long time  
> (depending on Win OS success 6 to 10 years).
> Firefox and Safari could align their behavior in the next 2-3 years  
> and update their users accordingly.

Unless a mode can be eliminated altogether, it makes no sense to  
migrate unmaintained legacy designs towards the standards mode. If  
those designs were broken in the quirks mode but not in the almost  
standards mode and were maintained, they could have been migrated away  
from quirks by their authors during the past 8 years or so. If those  
designs are not perceived as broken in the quirks mode but would be in  
the almost standards mode, browsers migrating the pages to the almost  
standards mode would be a failure to Support Existing Content. For the  
cases where the results of such migration would be indifferent,  
there'd be nothing to gain from such migration.

HTML 4.0 Transitional with system id has triggered the quirks mode in  
Gecko since 2000-10-19 and in WebKit as long as WebKit has been  
publicly available. During all that time HTML 4.0 has been a legacy  
spec and HTML 4.01 has been the latest HTML REC. How does the HTML 4.0  
Transitional doctype with a system id get introduced into newly- 
authored pages?

Henri Sivonen
Received on Monday, 6 April 2009 07:21:11 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:44 UTC