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

Kornel Lesinski kornel at osiolki.net
Wed Mar 7 16:08:30 PST 2007

On Wed, 07 Mar 2007 23:52:08 -0000, Alexey Feldgendler  
<alexey at feldgendler.ru> wrote:

>> Even your regular expressions for User-Agent aren't doing exactly what  
>> you intended, because mod_rewrite does not anchor patterns.
> While I totally agree that browser sniffing isn't a way to go, I must  
> say that Accept headers cannot be used to resolve this because MSIE  
> claims to support */* in the Accept header that it sends.

And Googlebot claims to accept "application/*".

Despite that Accept header can resolve this issue. XHTML browsers include  
full "application/xhtml+xml" MIME type, so you can avoid false positives  
if you ignore wildcard matches in negotiation. While it's not perfect, I  
think it's still better than using User-Agent for the same purpose.

regards, Kornel Lesiński

More information about the whatwg mailing list