httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Millikan" <gmilli...@t1shopper.com>
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
"application/xhtml+xml."

http://www.w3.org/2003/01/xhtml-mimetype/content-negotiation

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:
http://httpd.apache.org/docs/current/content-negotiation.html#caching

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

Thanks,

http://www.t1shopper.com/ 
 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message