W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2007

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

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 07 Mar 2007 18:07:12 +0100
Message-ID: <op.totwiaoi64w2qv@id-c0020.driveway.uu.nl>
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
Received on Wednesday, 7 March 2007 09:07:12 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:53 UTC