Multiple Choices for Web Statistics
Multiple Choices for Web Statistics:
<a href=stats.tables.html>Version with HTML tables
<a href=stats.html>Version without HTML tables
<a href=stats.ps>Postscript version
blex
The Alternates header in the above script must be read as a single
line. The script always generates a list response with the 200 (OK)
code, which ensures compatibility with non-negotiating HTTP/1.0
agents.
RFC 2295 Transparent Content Negotiation March 1998
21.2 Direct support by HTTP servers
Sophisticated HTTP servers could make a transparent negotiation
module available to content authors. Such a module could incorporate
a remote variant selection algorithm and an implementation of the
algorithm for generating choice responses (section 10.2). The
definition of interfaces to such modules is beyond the scope of this
specification.
21.3 Web publishing tools
Web publishing tools could automatically generate several variants of
a document (for example the original TeX version, a HTML version with
tables, a HTML version without tables, and a Postscript version),
together with an appropriate variant list in the interface format of
a HTTP server transparent negotiation module. This would allow
documents to be published as transparently negotiable resources.
22 Appendix: Example of choice response construction
The following is an example of the construction of a choice response
by a proxy cache which supports HTTP/1.1 and transparent content
negotiation. The use of the HTTP/1.1 conditional request mechanisms
is also shown.
Assume that a user agent has cached a variant list with the validator
"1234" for the negotiable resource http://x.org/paper. Also assume
that it has cached responses from two neighboring variants, with the
entity tags "gonkyyyy" and W/"a;b". Assume that all three user agent
cache entries are stale: they would need to be revalidated before the
user agent can use them. If http://x.org/paper accessed in this
situation, the user agent could send the following request to its
proxy cache:
GET /paper HTTP/1.1
Host: x.org
User-Agent: WuxtaWeb/2.4
Negotiate: 1.0
Accept: text/html, application/postscript;q=0.4, */*
Accept-Language: en
If-None-Match: "gonkyyyy;1234", W/"a;b;1234"
Assume that the proxy cache has cached the same three items as the
user agent, but that it has revalidated the variant list 8000 seconds
ago, so that the list is still fresh for the proxy. This means that
the proxy can run a remote variant selection algorithm on the list
and the incoming request.
RFC 2295 Transparent Content Negotiation March 1998
Assume that the remote algorithm is able to choose paper.html.en as
the best variant. The proxy can now construct a choice response,
using the algorithm in section 10.2. In steps 1 and 2 of the
algorithm, the proxy can construct the following conditional request
on the best variant, and send it to the origin server:
GET /paper.html.en HTTP/1.1
Host: x.org
User-Agent: WuxtaWeb/2.4
Negotiate: 1.0
Accept: text/html, application/postscript;q=0.4, */*
Accept-Language: en
If-None-Match: "gonkyyyy", W/"a;b"
Via: 1.1 fred
On receipt of the response
=31= |