[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Can I serve one resource with two distinct MIME-types?
- From: Julian Reschke <julian.reschke@gmx.de>
- To: Manfred Staudinger <manfred.staudinger@gmail.com>
- Date: Tue, 23 Oct 2007 12:35:36 +0200
Manfred Staudinger wrote:
> When it comes to deliver XHTML to various browsers, it seems that the
> tutorial [1], written by Dominique Hazaël-Massieux,
> "Content-Negotiation Techniques to serve XHTML 1.0 as text/html and
> application/xhtml+xml" (2003), still represents the state of the art.
I don't think that serving XHTML as text/html is "state of the art",
unless the XHTML happens to be valid HTML as well.
> In a small paragraph, under the heading "Can I serve one resource with
> two distinct MIME-types?", he wrote:
> While it's theoretically possible, I don't know any way to do it
> without breaking some important aspects of HTTP (such as proxying, or
> the HTTP PUT method) - that is, the method I know using RewriteRules
> doesn't set headers such as ETag as it should.
Of course you *can* do that; it's called content negotiation (yes, even
if the response *body* is the same).
> ...
> This works for me without problems! Some advantages:
> - no renames necessary, thereby preserving the search engine index
> - no content-negotiation, supports both HTTP1.0 and HTTP1.1.
You are doing content negotiation here, because your server's response
varies based on the "Accept" request header. Thus you will either have
to disable (public) caching, or provide a "Vary" response header that
would enable intermediates to serve the correct variant.
> - no duplicate content
> - easy testing on a per directory basis
>
> Manfred
>
> [1] http://www.w3.org/2003/01/xhtml-mimetype/content-negotiation
> [2] http://issues.apache.org/bugzilla/show_bug.cgi?id=36590
> ...
Best regards, Julian
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]