[whatwg] Using the HTML5 DOCTYPE as a new quirksmode switch

On Mar 10, 2007, at 11:03 PM, Andrew Fedoniouk wrote:
> It is idealistic because, say, if you will put following in  
> your .htaccess:
> AddType foo/bar .html

If I "AddType application/xhtml+xml .html" to a .htaccess file, it  
causes browsers to interpret my html as XHTML.  Browsers might ignore  
unknown types, but, at least with HTML, serving it with a different  
type DOES make a different.  If I add a no-cache or expires header  
via the PHP header(), the browser caches the file differently.  It  
might be idealistic to throw an unknown header and expect it to work,  
but if it is a header the browser knows, it will behave differently.   
IE is willing to add some Super-Standards Mode based on some new  
switch.  So, they will recognize the header.

> Think about this: All UAs will correctly present file
> some.png even it contains jpeg bits. Even if server reports image/x- 
> png content-type for it.
> It is very old tradition in software design - all file formats  
> contain identification of the
> content type in some form - usually first 256 bytes
> is enough to determine type. So why html should be an exception of  
> this rule?

UAs sniff headers.  WHATWG's HTML 5 is trying to kill off the DTD,  
which would be a good thing to sniff on, as I specified in the blog I  
posted about this very subject.[1]  What the WHATWG gives us is only  
a way to say "This is HTML" not "This is HTML 5" or "This is HTML  
6."  So, sniffing isn't possible as far as I can tell.  That is why  
it is an exception.

Furthermore, if we follow the spec, we will be fine for all things  
HTML 5 wants.  The DOCTYPE is new and unique.  For HTML 6, if we need  
to tell the browser something else, we can't.  There is no versioning.

This thread is about telling IE to turn on super standards mode.  (I  
combined some stuff that has been on my mind instead of starting a  
new thread.  As a newbie to this mailing list, I didn't want to over- 
step my bounds early on.  It's ended up with more confusion.)  IE's  
rendering modes have nothing to do with the HTML document itself, and  
everything to do with telling the browser how to handle the  
document.  It's not the responsibility of the recommendation to tell  
the browser what mode it needs to render in.  It's not in the W3C  
recommendation to use the DOCTYPE as a quirksmode switch in HTML 4.   
It was something that the browser vendors decided to do.  As I said  
before, I think it's a cop out for the IE team to ask for a new  
switch.  They should be creative and figure it out themselves.  My  
suggestion was for them to do something non-invasive to the HTML 5  
recommendation (look for a particular header) that would work even if  
W3C's recommendation is radically different from the WHATWG's.  It  
will be more universal, won't bloat the specs, will work better for  
what the IE team expects (something in addition to the doctype) and  
can be modified to whatever Microsoft decides it wants to be since it  
will be proprietary to their browser.

----------------------------------------------------------
Robert <http://robertdot.org>



[1] http://robertdot.org/2007/03/08/html-5-whatwg-versus-w3c.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070311/983eb624/attachment.htm>

Received on Sunday, 11 March 2007 01:49:59 UTC