The reliance on Content-type
Martin Atkins
mart at degeneration.co.uk
Tue Nov 15 10:30:33 PST 2005
Ernst Johannes wrote:
> Has anybody definitive experience with varying Accept headers for the
> same resource, and web caches out there? (I don't)
>
> In other words, are we absolutely sure that if the following passes
> through a cache:
>
> GET /something
> Accept: text/html, (whatever normal browsers do)
>
> GET /something
> Accept: application/xrid+xml, text/html;q=0.5
>
> 99% of all deployed caches will indeed return the XML instead of the
> HTML in the second case?
>
The HTTP spec requires that the server's response include:
Vary: Accept
...which is intended to indicate to proxy servers that the response is
only valid for requests with the same value in the Accept header.
This is a valid concern, though, since it's of course not guaranteed
that proxy servers have support for Vary nor that existing content
negotiation software (such as Apache's mod_negotiate) uses the Vary
field. I don't have any definitive answers here.
I do, however, know of several sites that successfully use content
negotiation and which haven't reported any problems with clients getting
the wrong representation. This might well be a commentary on how few
people use caching proxy servers rather than on proxy server support, of
course.
More information about the yadis
mailing list