httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Millikan" <gmilli...@t1shopper.com>
Subject [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 18:26:18 GMT
Dear List,

For the browsers that support XHTML we'll set the Content-Type as "application/xhtml+xml"
otherwise we'll send the same XHTML
document as Content-Type "text/html."  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

Thanks,

http://www.t1shopper.com/ 

PS. We'd consider using mod_negotiation to do this but we'd prefer not to make a HTML and
XHTML of the same page.  We're just going
to make one XHTML document and send it to everyone. The browsers that don't support XHTML
will just have to do their best.

PPS. The recommended Content-Type for XHTML documents (which despite mixed support, is W3C's
recommended language for mobile
browsers: http://www.w3.org/TR/mobile-bp/#ddc ) is "application/xhtml+xml" but it's permitted
to be "text/html."  

http://www.w3.org/TR/2009/NOTE-xhtml-media-types-20090116/#text-html





---------------------------------------------------------------------
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