httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Millikan" <>
Subject RE: [users@httpd] XHTML > Set Content-Type as "application/xhtml+xml" for browsers that support it otherwise degrade to "text/html"
Date Mon, 02 May 2011 20:03:31 GMT
>Is the best way to do this like: 
> AddDefaultCharset text/html
> SetEnvIfNoCase Accept "xhtml" ua_supports_xhtml=1
> Header set Content-Type "application/xhtml+xml" env=ua_supports_xhtml

Not sure if above method is "best" but we tested and it "works" but since we're using mod_cache
it doesn't work.  Why?  Because the
first time the page is requested it's cached.  And the cached version contains randomly either
"application/xhtml+xml" or
"text/html."  So everyone other than the first requestor is going to get the cached version
- which may or may not match the request
header parameters. 

W3C has a nice write up on this issue at link below and they even say they are using one of
the techniques (using mod_negotiation)
however it doesn't seem to be working because when I request a page from W3C sending in an
Accept header of
"text/html,application/xhtml+xml,application/xml..." I get back headers of "Content-Type text/html..."
instead of the expected

The latest mod_negotiation module might circumvent whatever issue W3C appears to be having
and/or the above mod_cache issue per link
below but it's a bit vague:

Anyway, I think we're going to have to scrap using XHTML.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message