RE: XHTML > Set Content-Type as "application/xhtml+xml" for browsers that support it otherwise degrade to "text/html"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux