[whatwg] Configure Apache to send the right MIME type for XHTML

Anne van Kesteren annevk at opera.com
Wed Mar 7 09:07:12 PST 2007


On Wed, 07 Mar 2007 17:13:42 +0100, Elliotte Harold  
<elharo at metalab.unc.edu> wrote:
> Indeed, if one were of a suspicious turn of mind, one might think the  
> insistence on sending XHTML as application/xhtml+xml were nothing but a  
> strategy to make XHTML so practically inconvenient that no one would  
> consider it. But I don't have such a suspicious mind, so I'm sure it's  
> all honest disagreement. :-)

You can just give your files an XML MIME type (.xml extension). That will  
work fine in most browsers. "XHTML" also works fine with the text/html  
MIME type (.htm extension), but then it won't be parsed as XML by your  
typical web browser.

This shouldn't be new information though...


If you're after the fact that browsers don't sniff for XML in text/html  
that's because the old HTML WG said so (there's a pointer somewhere out  
there) and changing that now is impossible given how many authors got XML  
as text/html "completely wrong".


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>



More information about the whatwg mailing list