Re: DOCTYPE Sniffing (was: Re: Errors)

Jukka K. Korpela wrote:
> On Mon, 28 Feb 2005, Lachlan Hunt wrote:
>>Using a transitional DOCTYPE with a system identifier (the URI), Mozilla
>>based browsers will use "Almost Standards Mode" rather than the full
>>"Standards Mode".  The differences between the two are minor,
> 
> If you care about the difference, you can use a DOCTYPE that pleases
> Mozilla...
> 
> It's not morally wrong to lie to a clueless program. Mozilla does not
> actually read the DTD, it only looks at the DOCTYPE declaration.

Yes but if you have a legitimate reason to make use of the deprecated 
features, intentionally making your document non-conformant (by 
declaring the wrong DOCTYPE in this case) as a work around for browser 
bugs (whether they are intentional bugs or not) is really a case of two 
wrongs don't make a right.

>>[1] http://www.mozilla.org/docs/web-developer/quirks/doctypes.html
> 
> It says that Mozilla goes to full standards mode if I use any
> <!DOCTYPE HTML SYSTEM ...>
> which is yet another indication of the cluelessness of the sniffing idea.

How is that clueless?  That means it is possible to use the transitional 
DOCTYPE and still trigger full standards mode in Mozilla.

<!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/html4/loose.dtd">

I'm not sure if that will trigger quirks or standards mode in other 
browsers, though.  The IE and Opera documentation is not nearly as in 
depth as Mozilla's.
-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox

Received on Monday, 28 February 2005 03:31:13 UTC