Format Negotiation and Caching [Was: Toward Graceful Deployment of Tables]

Dan Connolly (connolly@w3.org)
Wed, 15 Mar 1995 09:38:52 +0500

Gavin Nicol writes:
> It is possible
> for the user to specify different stylesheets, and thereby change the
> generated HTML (yet another problem for caching documents: the same
> URL might have any number of possible HTML pages).

This issue is addressed in the current HTTP protocol spec:

HTTP Working Group, INTERNET-DRAFT
Expires September 8, 1995[1]

7.1.13 URI [2]

URI: <TheProject.ps>;vary="encoding,version",
<TheProject.html>;vary="user-agent,charset,version"

The vary parameter has an important effect on cache management,
particularly for caching proxies which service a diverse set of user
agents. Since the response to one user agent may differ from the
response to a second user agent if the two agents have differing request
profiles, a caching proxy must keep track of the content
metainformation for resources with varying dimensions. Thus, the vary
parameter tells the caching proxy what entity headers must be part of
the key for caching that URI. When the caching proxy gets a request for
that URI, it must forward the request toward the origin server if the
request profile includes a variant dimension that has not already been
cached.

For rationale, see the "HTTP Caching Model?" thread[3] in the
HTTP-WG archive.

[1] http://www.w3.org/hypertext/WWW/Protocols/HTTP1.0/draft-ietf-http-spec.html
[2] http://www.w3.org/hypertext/WWW/Protocols/HTTP1.0/HTTP1.0-ID_30.html
[3] http://www.ics.uci.edu/pub/ietf/http/hypermail/1994q4/0145.html