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

Re: Revamp HTML5 doctype sniffing?

From: Simon Pieters <simonp@opera.com>
Date: Mon, 06 Apr 2009 16:43:12 +0200
To: Pine.LNX.4.62.0903271912570.25058@hixie.dreamhostps.com, public-html@w3.org
Message-ID: <op.uryy6ag8idj3kv@zcorpandell.linkoping.osa>
On Sat, 04 Apr 2009 23:24:06 +0200, Daniel Schattenkirchner <crazy-daniel@gmx.de> wrote:

> Sorry for reviving this one more time.
>
> Ian Hickson wrote:
>> In conclusion, I do not believe changing the sniffing algorithm at this  
>> point would be wise.
>
> In Opera 9.5 HTML 4.0 Transitional and Frameset doctypes with system  
> identifier also triggers Almost Standards Mode.

This was a regression from Opera 9.0 due to a misanalyzed broken page using the following doctype:

<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN" "http://...

It triggered quirks mode in Opera 9.0 but standards mode in Gecko and WebKit because we used a substring match and they matched the whole thing. Note the single slash in there.

So we changed to make HTML 4.0 transitional doctypes trigger almost standards mode. This broke other pages that used the proper HTML 4.0 transitional doctype and required quirks mode to work correctly (in Opera/Gecko/WebKit, anyway).

Opera 10 uses HTML5 rules for doctype sniffing.

-- 
Simon Pieters
Opera Software
Received on Monday, 6 April 2009 14:43:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:33 GMT