As per Relevance of the word transparent, we have this rfc below:
Network Working Group K.
Request for Comments: 2295
Category: Experimental A.
Hewlett-
March 1998
Transparent Content Negotiation in
Status of this
This memo defines an Experimental Protocol for the
community. It does not specify an Internet standard of any kind
Discussion and suggestions for improvement are requested
Distribution of this memo is unlimited
Copyright
Copyright (C) The Internet Society (1998). All Rights Reserved
HTTP allows web site authors to put multiple versions of the
information under a single URL. Transparent content negotiation
an extensible negotiation mechanism, layered on top of HTTP,
automatically selecting the best version when the URL is accessed
This enables the smooth deployment of new web data formats and
tags
TABLE OF
1 Introduction................................................4
1.1 Background................................................4
2 Terminology.................................................5
2.1 Terms from HTTP/1.1.......................................5
2.2 New terms.................................................6
3 Notation....................................................8
4 Overview....................................................9
4.1 Content negotiation.......................................9
4.2 HTTP/1.0 style negotiation scheme.........................9
4.3 Transparent content negotiation scheme...................10
4.4 Optimizing the negotiation process.......................12
4.5 Downwards compatibility with non-negotiating user agents.14
4.6 Retrieving a variant by hand.............................15
4.7 Dimensions of negotiation................................15
Holtman & Mutz Experimental [Page 1]
RFC 2295 Transparent Content Negotiation March 1998
4.8 Feature negotiation......................................15
4.9 Length of variant lists..................................16
4.10 Relation with other negotiation schemes.................16
5 Variant descriptions.......................................17
5.1 Syntax...................................................17
5.2 URI......................................................17
5.3 Source-quality...........................................18
5.4 Type, charset, language, and length......................19
5.5 Features.................................................19
5.6 Description..............................................19
5.7 Extension-attribute......................................20
6 Feature negotiation........................................20
6.1 Feature tags.............................................20
6.1.1 Feature tag values.....................................21
6.2 Feature sets.............................................21
6.3 Feature predicates.......................................22
6.4 Features attribute.......................................24
7 Remote variant selection algorithms........................25
7.1 Version numbers..........................................25
8 Content negotiation status codes and headers...............25
8.1 506 Variant Also Negotiates..............................25
8.2 Accept-Features..........................................26
8.3 Alternates...............................................27
8.4 Negotiate................................................28
8.5 TCN......................................................30
8.6 Variant-Vary.............................................30
9 Cache validators...........................................31
9.1 Variant list validators..................................31
9.2 Structured entity tags...................................31
9.3 Assigning entity tags to variants........................32
10 Content negotiation responses..............................32
10.1 List response...........................................33
10.2 Choice response.........................................34
10.3 Adhoc response..........................................37
10.4 Reusing the Alternates header...........................38
10.5 Extracting a normal response from a choice response.....39
10.6 Elaborate Vary headers..................................39
10.6.1 Construction of an elaborate Vary header..............40
10.6.2 Caching of an elaborate Vary header...................41
10.7 Adding an Expires header for HTTP/1.0 compatibility.....41
10.8 Negotiation on content encoding.........................41
Holtman & Mutz Experimental [Page 2]
RFC 2295 Transparent Content Negotiation March 1998
11 User agent support for transparent negotiation.............42
11.1 Handling of responses...................................42
11.2 Presentation of a transparently negotiated resource.....42
12 Origin server support for transparent negotiation..........43
12.1 Requirements............................................43
12.2 Negotiation on transactions other than GET and HEAD.....45
13 Proxy support for transparent negotiation..................45
14 Security and privacy considerations........................46
14.1 Accept- headers revealing personal information..........46
14.2 Spoofing of responses from variant resources............47
14.3 Security holes revealed by negotiation..................47
15 Internationalization considerations........................47
16 Acknowledgments............................................47
17 References.................................................48
18 Authors' Addresses.........................................48
19 Appendix: Example of a local variant selection algorithm...49
19.1 Computing overall quality values........................49
19.2 Determining the result..................................51
19.3 Ranking dimensions......................................51
20 Appendix: feature negotiation examples.....................52
20.1 Use of feature tags.....................................52
20.2 Use of numeric feature tags.............................53
20.3 Feature tag design......................................53
21 Appendix: origin server implementation considerations......54
21.1 Implementation with a CGI script........................54
21.2 Direct support by HTTP servers..........................55
21.3 Web publishing tools....................................55
22 Appendix: Example of choice response construction..........55
23 Full Copyright Statement...................................58
Holtman & Mutz Experimental [Page 3]
RFC 2295 Transparent Content Negotiation March 1998
1
HTTP allows web site authors to put multiple versions of the
information under a single URI. Each of these versions is called
`variant'. Transparent content negotiation is an
negotiation mechanism for automatically and efficiently
the best variant when a GET or HEAD request is made. This
the smooth deployment of new web data formats and markup tags
This specification defines transparent content negotiation as
extension on top of the HTTP/1.1 protocol [1]. However, use of
extension does not require use of HTTP/1.1: transparent
negotiation can also be done if some or all of the parties
HTTP/1.0 [2] systems
Transparent content negotiation is called `transparent' because
makes all variants which exist inside the origin server visible
outside parties
Note: Some members of the IETF are currently undertaking a
of activities which are loosely related to this
protocol. First, there is an effort to define a protocol
independent registry for feature tags. The intention is that
experimental protocol will be one of the clients of the registry
Second, some research is being done on content negotiation
for other transport protocols (like internet mail and internet fax
and on generalized negotiation systems for multiple
protocols. At the time of writing, it is unclear if or when
research will lead to results in the form of complete
system specifications. It is also unclear to which extent
future specifications can or will re-use elements of
experimental protocol
1.1
The addition of content negotiation to the web infrastructure
been considered important since the early days of the web. Among
expected benefits of a sufficiently powerful system for
negotiation
* smooth deployment of new data formats and markup tags
allow graceful evolution of the
* eliminating the need to choose between a `state of the
multimedia homepage' and one which can be viewed by all web
* enabling good service to a wider range of
platforms (from low-end PDA's to high-end VR setups
Holtman & Mutz Experimental [Page 4]
RFC 2295 Transparent Content Negotiation March 1998
* eliminating error-prone and cache-
User-Agent based
* enabling construction of sites without `click here for the
version'
* internationalization, and the ability to offer multi-
content without a bias towards one language
2
The words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
this document are to be interpreted as described in RFC 2119 [4].
This specification uses the term `header' as an abbreviation for
`header field in a request or response message'.
2.1 Terms from HTTP/1.1
This specification mostly uses the terminology of the HTTP/1.1
specification [1]. For the convenience of the reader, this
reproduces some key terminology definition from [1].
An HTTP request message
An HTTP response message
A network data object or service that can be identified by a URI
Resources may be available in multiple representations (e.g
multiple languages, data formats, size, resolutions) or vary
other ways
content
The mechanism for selecting the appropriate representation
servicing a request
A program that establishes connections for the purpose of
requests
user
The client which initiates a request. These are often browsers
editors, spiders (web-traversing robots), or other end user tools
Holtman & Mutz Experimental [Page 5]
RFC 2295 Transparent Content Negotiation March 1998
An application program that accepts connections in order to
requests by sending back responses. Any given program may
capable of being both a client and a server; our use of these
refers only to the role being performed by the program for
particular connection, rather than to the program's capabilities
general. Likewise, any server may act as an origin server, proxy
gateway, or tunnel, switching behavior based on the nature of
request
origin
The server on which a given resource resides or is to be created
An intermediary program which acts as both a server and a
for the purpose of making requests on behalf of other clients
Requests are serviced internally or by passing them on,
possible translation, to other servers. A proxy must
both the client and server requirements of this specification
The age of a response is the time since it was sent by,
successfully validated with, the origin server
A response is fresh if its age has not yet exceeded its
lifetime
2.2 New
transparently negotiable
A resource, identified by a single URI, which has
representations (variants) associated with it. When servicing
request on its URI, it allows selection of the best
using the transparent content negotiation mechanism.
transparently negotiable resource always has a variant list
to it, which can be represented as an Alternates header (defined
section 8.3).
variant
A list containing variant descriptions, which can be bound to
transparently negotiable resource
Holtman & Mutz Experimental [Page 6]
RFC 2295 Transparent Content Negotiation March 1998
variant
A machine-readable description of a variant resource, usually
in a variant list. A variant description contains the
resource URI and various attributes which describe properties
the variant. Variant descriptions are defined in section 5.
variant
A resource from which a variant of a negotiable resource can
retrieved with a normal HTTP/1.x GET request, i.e. a GET
which does not use transparent content negotiation
neighboring
A variant resource is called a neighboring variant resource of
transparently negotiable HTTP resource if the variant resource
a HTTP URL, and if the absolute URL of the variant resource up
its last slash equals the absolute URL of the negotiable
up to its last slash, where equality is determined with the
comparison rules in section 3.2.3 of [1]. The property of being
neighboring variant is important because of security
(section 14.2). Not all variants of a negotiable resource need
be neighboring variants. However, access to neighboring
can be more highly optimized by the use of remote variant
algorithms (section 7) and choice responses (section 10.2).
remote variant selection
A standardized algorithm by which a server can sometimes choose
best variant on behalf of a negotiating user agent. The
typically computes whether the Accept- headers in the
contain sufficient information to allow a choice, and if so,
variant is the best variant. The use of a remote algorithm
speed up the negotiation process
list
A list response returns the variant list of the
resource, but no variant data. It can be generated when the
does not want to, or is not allowed to, return a particular
variant for the request. List responses are defined in
10.1.
choice
A choice response returns a representation of the best variant
the request, and may also return the variant list of the
resource. It can be generated when the server has
information to be able to choose the best variant on behalf
user agent, but may only be generated if this best variant is
neighboring variant. Choice responses are defined in section 10.2.
Holtman & Mutz Experimental [Page 7]
RFC 2295 Transparent Content Negotiation March 1998
adhoc
An adhoc response can be sent by an origin server as an
measure, to achieve compatibility with a non-negotiating or
client if this compatibility cannot be achieved by sending a
or choice response. There are very little requirements on
contents of an adhoc response. Adhoc responses are defined
section 10.3.
Accept-
The request headers: Accept, Accept-Charset, Accept-Language,
Accept-Features
supports transparent content
From the viewpoint of an origin server or proxy, a user
supports transparent content negotiation if and only if it sends
Negotiate header (section 8.4) which indicates such support
server-side
If a request on a transparently negotiated resource is made by
client which supports transparent content negotiation, an
server is said to perform a server-side override if the
ignores the directives in the Negotiate request header, and
uses a custom algorithm to choose an appropriate response.
server-side override can sometimes be used to work around
client bugs. It could also be used by protocol extensions on
of transparent content negotiation
3
The version of BNF used in this document is taken from [1], and
of the nonterminals used are defined in [1]. Note that
underlying charset is US-ASCII
One new BNF construct is added
1%
stands for one or more instances of "rule", separated by whitespace
1%rule = rule *( 1*LWS rule )
This specification also
number = 1*
short-float = 1*3DIGIT [ "." 0*3DIGIT ]
Holtman & Mutz Experimental [Page 8]
RFC 2295 Transparent Content Negotiation March 1998
This specification uses the same conventions as in [1] (see
1.2 of [1]) for defining the significance of each
requirement
4
This section gives an overview of transparent content negotiation
It starts with a more general discussion of negotiation as
by HTTP
4.1 Content
HTTP/1.1 allows web site authors to put multiple versions of the
information under a single resource URI. Each of these versions
called a `variant'. For example, a resource http://x.org/paper
bind to three different variants of a paper
1. HTML,
2. HTML,
3. Postscript,
Content negotiation is the process by which the best variant
selected if the resource is accessed. The selection is done
matching the properties of the available variants to the
of the user agent and the preferences of the user
It has always been possible under HTTP to have
representations available for one resource, and to return the
appropriate representation for each subsequent request. However
HTTP/1.1 is the first version of HTTP which has provisions for
this in a cache-friendly way. These provisions include the
response header, entity tags, and the If-None-Match request header
4.2 HTTP/1.0 style negotiation
The HTTP/1.0 protocol elements allow for a negotiation scheme
follows
Server _____ proxy _____ proxy _____
x.org cache cache
< ----------------------------------
| GET http://x.org/
| Accept-
|
---------------------------------- >
Best
Holtman & Mutz Experimental [Page 9]
RFC 2295 Transparent Content Negotiation March 1998
When the resource is accessed, the user agent sends (along with
request) various Accept- headers which express the user
capabilities and the user preferences. Then the origin server
these Accept- headers to choose the best variant, which is
in the response
The biggest problem with this scheme is that it does not scale well
For all but the most minimal user agents, Accept- headers
all capabilities and preferences would be very large, and
them in every request would be hugely inefficient, in
because only a small fraction of the resources on the web
multiple variants
4.3 Transparent content negotiation
The transparent content negotiation scheme eliminates the need
send huge Accept- headers, and nevertheless allows for a
process that always yields either the best variant, or an
message indicating that user agent is not capable of displaying
of the available variants
Under the transparent content negotiation scheme, the server sends
list with the available variants and their properties to the
agent. An example of a list with three variants
{"paper.1" 0.9 {type text/html} {language en}},
{"paper.2" 0.7 {type text/html} {language fr}},
{"paper.3" 1.0 {type application/postscript} {language en}}
The syntax and semantics of the variant descriptions in this list
covered in section 5. When the list is received, the user agent
choose the best variant and retrieve it. Graphically,
communication can be represented as follows
Holtman & Mutz Experimental [Page 10]
RFC 2295 Transparent Content Negotiation March 1998
Server _____ proxy _____ proxy _____
x.org cache cache
< ----------------------------------
| GET http://x.org/
|
----------------------------------- > [list response
return of list |
|
< ----------------------------------
| GET http://x.org/paper.1
|
---------------------------------- > [normal response
return of paper.1
The first response returning the list of variants is called a `
response'. The second response is a normal HTTP response: it
not contain special content negotiation related information.
the user agent needs to know that the second request
retrieves a variant. For the other parties in the communication,
second transaction is indistinguishable from a normal
transaction
With this scheme, information about capabilities and preferences
only used by the user agent itself. Therefore, sending
information in large Accept- headers is unnecessary. Accept-
do have a limited use in transparent content negotiation however;
sending of small Accept- headers can often speed up the
process. This is covered in section 4.4.
List responses are covered in section 10.1. As an example, the
response in the above picture could be
HTTP/1.1 300 Multiple
Date: Tue, 11 Jun 1996 20:02:21
TCN:
Alternates: {"paper.1" 0.9 {type text/html} {language en}},
{"paper.2" 0.7 {type text/html} {language fr}},
{"paper.3" 1.0 {type application/postscript
{language en}}
Vary: negotiate, accept, accept-
ETag: "blah;1234"
Cache-control: max-age=86400
Content-Type: text/
Content-Length: 227
The Alternates header in the response contains the variant list.
Vary header is included to ensure correct caching by plain HTTP/1.1
caches (see section 10.6). The ETag header allows the response to
revalidated by caches, the Cache-Control header controls
revalidation. The HTML entity included in the response allows
user to select the best variant by hand if desired
4.4 Optimizing the negotiation
The basic transparent negotiation scheme involves two
transactions: one to retrieve the list, and a second one to
the chosen variant. There are however several ways to `cut corners
in the data flow path of the basic scheme
First, caching proxies can cache both variant lists and variants
Such caching can reduce the communication overhead, as shown in
following example
Server _____ proxy _____ proxy __________
x.org cache cache
< --------------
| GET ../
|
has the
in
|
------------- > [list response
list |
|
|
< --------------------------
| GET ../paper.1
|
has the
in
|
-------------------------- > [normal response
return of paper.1
Holtman & Mutz Experimental [Page 12]
RFC 2295 Transparent Content Negotiation March 1998
Second, the user agent can send small Accept- headers, which
contain enough information to allow the server to choose the
variant and return it directly
Server _____ proxy _____ proxy _____
x.org cache cache
< ----------------------------------
| GET http://x.org/
| small Accept-
|
able to choose
behalf of user
|
---------------------------------- > [choice response
return of paper.1 and
This choosing based on small Accept- headers is done with a `
variant selection algorithm'. Such an algorithm takes the
list and the Accept- headers as input. It then computes whether
Accept- headers contain sufficient information to choose on behalf
the user agent, and if so, which variant is the best variant. If
best variant is a neighboring variant, it may be returned,
with the variant list, in a choice response
A server may only choose on behalf of a user agent
transparent content negotiation if the user agent explicitly
the use of a particular remote variant selection algorithm in
Negotiate request header. User agents with sophisticated
variant selection algorithms may want to disallow a remote choice,
may want to allow it only when retrieving inline images. If
local algorithm of the user agent is superior in only some
areas of negotiation, it is possible to enable the remote
for the easy areas only. More information about the use of a
variant selection algorithm can be found in [3].
Choice responses are covered in section 10.2. For example,
choice response in the above picture could be
HTTP/1.1 200
Date: Tue, 11 Jun 1996 20:05:31
TCN:
Content-Type: text/
Last-Modified: Mon, 10 Jun 1996 10:01:14
Content-Length: 5327
Cache-control: max-age=604800
Content-Location: paper.1
Alternates: {"paper.1" 0.9 {type text/html} {language en}},
Holtman & Mutz Experimental [Page 13]
RFC 2295 Transparent Content Negotiation March 1998
{"paper.2" 0.7 {type text/html} {language fr}},
{"paper.3" 1.0 {type application/postscript
{language en}}
Etag: "gonkyyyy;1234"
Vary: negotiate, accept, accept-
Expires: Thu, 01 Jan 1980 00:00:00
A paper about ....
Finally, the above two kinds of optimization can be combined;
caching proxy which has the list will sometimes be able to choose
behalf of the user agent. This could lead to the
communication pattern
Server _____ proxy _____ proxy __________
x.org cache cache
< ---------------
| GET ../
| small
|
able to
on
|
< ----------
| GET ../paper.1
|
---------- > [normal response
paper.1 |
---------------- > [choice response
paper.1 and
Note that this cutting of corners not only saves bandwidth, it
eliminates delays due to packet round trip times, and reduces
load on the origin server
4.5 Downwards compatibility with non-negotiating user
To handle requests from user agents which do not support
content negotiation, this specification allows the origin server
revert to a HTTP/1.0 style negotiation scheme. The specification
heuristics for such schemes is beyond the scope of this document
Holtman & Mutz Experimental [Page 14]
RFC 2295 Transparent Content Negotiation March 1998
4.6 Retrieving a variant by
It is always possible for a user agent to retrieve the variant
which is bound to a negotiable resource. The user agent can use
list to make available a menu of all variants and
characteristics to the user. Such a menu allows the user to
browse other variants, and makes it possible to manually correct
sub-optimal choice made by the automatic negotiation process
4.7 Dimensions of
Transparent content negotiation defines four dimensions
negotiation
1. Media type (MIME type
2.
3.
4.
The first three dimensions have traditionally been present in HTTP
The fourth dimension is added by this specification.
dimensions, beyond the four mentioned above, could be added by
specifications
Negotiation on the content encoding of a response (gzipped
compressed, etc.) is left outside of the realm of
negotiation. See section 10.8 for more information
4.8 Feature
Feature negotiation intends to provide for all areas of
not covered by the type, charset, and language dimensions.
are negotiation
* HTML
* Extensions of other media
* Color capabilities of the user
* Screen
* Output medium (screen, paper, ...)
* Preference for speed vs. preference for graphical
The feature negotiation framework (section 6) is the principal
by which transparent negotiation offers extensibility; a
dimension of negotiation (really a sub-dimension of the
dimension) can be added without the need for a new standards
by the simple registration of a `feature tag'.
Holtman & Mutz Experimental [Page 15]
RFC 2295 Transparent Content Negotiation March 1998
4.9 Length of variant
As a general rule, variant lists should be short: it is expected
a typical transparently negotiable resource will have 2 to 10
variants, depending on its purpose. Variant lists should be
for a number of reasons
1. The user must be able to pick a variant by hand to correct
bad automatic choice, and this is more difficult with a
variant list
2. A large number of variants will decrease the efficiency
internet proxy caches
3. Long variant lists will make some transparently
responses longer
In general, it is not desirable to create a transparently
resource with hundreds of variants in order to fine-tune
graphical presentation of a resource. Any graphical fine-
should be done, as much as possible, by using constructs which act
the user agent side, for
alt="MegaBozo Corp">
In order to promote user agent side fine tuning, which is
scalable than fine tuning over the network, user agents
implement a scripting language for content rendering are
to make the availability of this language visible for
content negotiation, and to allow rendering scripts to access
capabilities and preferences data used for content negotiation,
far as privacy considerations permit this
4.10 Relation with other negotiation
The HTTP/1.x protocol suite allows for many different
mechanisms. Transparent content negotiation specializes in scalable
interoperable negotiation of content representations at the
level. It is intended that transparent negotiation can co-exist
other negotiation schemes, both open and proprietary, which
different application domains or work at different points in
author-to-user chain. Ultimately, it will be up to the
author to decide which negotiation mechanism, or combination
negotiation mechanisms, is most appropriate for the task at hand
Holtman & Mutz Experimental [Page 16]
RFC 2295 Transparent Content Negotiation March 1998
5 Variant
5.1
A variant can be described in a machine-readable way with a
description
variant-description =
"{" <"> URI <"> source-quality *variant-attribute"}"
source-quality =
variant-attribute = "{" "type" media-type "}"
| "{" "charset" charset "}"
| "{" "language" 1#language-tag "}"
| "{" "length" 1*DIGIT "}"
| "{" "features" feature-list "}"
| "{" "description
quoted-string [ language-tag ] "}"
| extension-
extension-attribute = "{" extension-name extension-value "}"
extension-name =
extension-value = *( token | quoted-string |
| extension-specials )
extension-specials =
and "}">
The feature-list syntax is defined in section 6.4.
Examples
{"paper.2" 0.7 {type text/html} {language fr}}
{"paper.5" 0.9 {type text/html} {features tables}}
{"paper.1" 0.001}
The various attributes which can be present in a variant
are covered in the subsections below. Each attribute may appear
once in a variant description
5.2
The URI attribute gives the URI of the resource from which
variant can be retrieved with a GET request. It can be absolute
relative to the Request-URI. The variant resource may vary (on
Holtman & Mutz Experimental [Page 17]
RFC 2295 Transparent Content Negotiation March 1998
Cookie request header, for example), but MUST NOT engage
transparent content negotiation itself
5.3 Source-
The source-quality attribute gives the quality of the variant, as
representation of the negotiable resource, when this variant
rendered with a perfect rendering engine on the best possible
medium
If the source-quality is less than 1, it often expresses a
degradation caused by a lossy conversion to a particular data format
For example, a picture originally in JPEG form would have a
source quality when translated to the XBM format, and a much
source quality when translated to an ASCII-art variant.
however, that degradation is a function of the source; an
piece of ASCII-art may degrade in quality if it is captured in
form
The source-quality could also represent a level of quality caused
skill of language translation, or ability of the used media type
capture the intended artistic expression
Servers should use the following table a guide when assigning
quality values
1.000 perfect
0.900 threshold of noticeable loss of
0.800 noticeable, but acceptable quality
0.500 barely acceptable
0.300 severely degraded
0.000 completely degraded
The same table can be used by local variant selection algorithms (
appendix 19) when assigning degradation factors for different
rendering mechanisms. Note that most meaningful values in this
are close to 1. This is due to the fact that quality factors
generally combined by multiplying them, not by adding them
When assigning source-quality values, servers should not account
the size of the variant and its impact on transmission and
delays; the size of the variant should be stated in the
attribute and any size-dependent calculations should be done by
variant selection algorithm. Any constant rendering delay for
particular media type (for example due to the startup time of
helper application) should be accounted for by the user agent,
assigning a quality factor to that media type
Holtman & Mutz Experimental [Page 18]
RFC 2295 Transparent Content Negotiation March 1998
5.4 Type, charset, language, and
The type attribute of a variant description carries the
information as its Content-Type response header counterpart
in [1], except for any charset information, which MUST be carried
the charset attribute. For, example, the
Content-Type: text/html; charset=ISO-8859-4
has the counterpart
{type text/html} {charset ISO-8859-4}
The language and length attributes carry the same information
their Content-* response header counterparts in [1]. The
attribute, if present, MUST thus reflect the length of the
alone, and not the total size of the variant and any objects
or embedded by the variant
Though all of these attributes are optional, it is often desirable
include as many attributes as possible, as this will increase
quality of the negotiation process
Note: A server is not required to maintain a one-to-
correspondence between the attributes in the variant
and the Content-* headers in the variant response. For example
if the variant description contains a language attribute,
response does not necessarily have to contain a Content-
header. If a Content-Language header is present, it does not
to contain an exact copy of the information in the
attribute
5.5
The features attribute specifies how the presence or absence
particular feature tags in the user agent affects the overall
of the variant. This attribute is covered in section 6.4.
5.6
The description attribute gives a textual description of the variant
It can be included if the URI and normal attributes of a variant
considered too opaque to allow interpretation by the user. If a
agent is showing a menu of available variants compiled from a
list, and if a variant has a description attribute, the user
SHOULD show the description attribute of the variant instead
showing the normal attributes of the variant. The description
uses the UTF-8 character encoding scheme [5], which is a superset
Holtman & Mutz Experimental [Page 19]
RFC 2295 Transparent Content Negotiation March 1998
US-ASCII, with ""%" HEX HEX" encoding. The optional language tag
be used to specify the language used in the description text
5.7 Extension-
The extension-attribute allows future specifications to
define dimensions of negotiation which cannot be created by using
feature negotiation framework, and eases content
experiments. In experimental situations, servers MUST ONLY
extension-attributes whose names start with "x-". User agents
ignore all extension attributes they do not recognize. Proxies
NOT run a remote variant selection algorithm if an unknown
attribute is present in the variant list
6 Feature
This section defines the feature negotiation mechanism.
negotiation has been introduced in section 4.8. Appendix 19
examples of feature negotiation
6.1 Feature
A feature tag (ftag) identifies something which can be negotiated on
for example a property (feature) of a representation, a
(feature) of a user agent, or the preference of a user for
particular type of representation. The use of feature tags need
be limited to transparent content negotiation, and not every
tag needs to be usable in the HTTP transparent content
framework
ftag = token | quoted-
Note: A protocol-independent system for feature tag
is currently being developed in the IETF. This specification
not define any feature tags. In experimental situations, the
of tags which start with "x." is encouraged
Feature tags are used in feature sets (section 6.2) and in
predicates (section 6.3). Feature predicates are in turn used
features attributes (section 6.4), which are used in
descriptions (section 5). Variant descriptions can be transmitted
Alternates headers (section 8.3).
The US-ASCII charset is used for feature tags. Feature
comparison is case-insensitive. A token tag XYZ is equal to
quoted-string tag "XYZ". Examples
tables, fonts, blebber, wolx, screenwidth,
Holtman & Mutz Experimental [Page 20]
RFC 2295 Transparent Content Negotiation March 1998
An example of the use of feature tags in a variant description is
{"index.html" 1.0 {type text/html} {features tables frames}}
This specification follows general computing practice in that
places no restrictions on what may be called a feature. At
protocol level, this specification does not distinguish
different uses of feature tags: a tag will be processed in the
way, no matter whether it identifies a property, capability,
preference. For some tags, it may be fluid whether the
represents a property, preference, or capability. For example,
content negotiation on web pages, a "textonly" tag would identify
capability of a text-only user agent, but the user of a
user agent may use this tag to specify that text-only content
preferred over graphical content
6.1.1 Feature tag
The definition of a feature tag may state that a feature tag can
zero, one, or more values associated with it. These
specialize the meaning of the tag. For example, a feature
`paper' could be associated with the values `A4' and `A5'.
tag-value = token | quoted-
The US-ASCII charset is used for feature tag values.
comparison for tag values MUST be done with a case-sensitive, octet
by-octet comparison, where any ""%" HEX HEX" encodings MUST
processed as in [1]. A token value XYZ is equal to a quoted-
value "XYZ".
6.2 Feature
The feature set of a user agent is a data structure which records
capabilities of the user agent and the preferences of the user
Feature sets are used by local variant selection algorithms (
appendix 19 for an example). A user agent can use the Accept
Features header (section 8.2) to make some of the contents of
feature set known to remote variant selection algorithms
Structurally, a feature set is a possibly empty set,
records of the
( feature tag , set of feature tag values )
Holtman & Mutz Experimental [Page 21]
RFC 2295 Transparent Content Negotiation March 1998
If a record with a feature tag is present in the set, this means
the user agent implements the corresponding capability, or that
user has expressed the corresponding preference
Each record in a feature set has a, possibly empty, set of
values. For feature tags which cannot have values associated
it, this set is always empty. For feature tags which can have zero
one, or more values associated with it, this set contains
values currently associated with the tag. If the set of a
tag T has the value V in it, it is said that `the tag T is
with the value V'.
This specification does not define a standard notation for
sets. An example of a very small feature set, in a
notation,
{ ( "frames" , { } ) ,
( "paper" , { "A4" , "A5" } )
}
As feature registration is expected to be an ongoing process, it
generally not possible for a user agent to know the meaning of
feature tags it can possibly encounter in a variant description.
user agent SHOULD treat all features tags unknown to it as
from its feature set
A user agent may change the contents of its feature set depending
the type of request, and may also update it to reflect
conditions, for example a change in the window size. Therefore,
considering feature negotiation, one usually talks about `the
set of the current request'.
6.3 Feature
Feature predicates are predicates on the contents of feature sets
They appear in the features attribute of a variant description
fpred = [ "!" ]
| ftag ( "=" | "!=" ) tag-
| ftag "=" "[" numeric-range "]"
numeric-range = [ number ] "-" [ number ]
Feature predicates are used in features attributes (section 6.4),
which are used in variant descriptions (section 5).
descriptions can be transmitted in Alternates headers (section 8.3).
Holtman & Mutz Experimental [Page 22]
RFC 2295 Transparent Content Negotiation March 1998
Examples of feature predicates
blebber, !blebber, paper=a4, colordepth=5, blex!=54,
dpi=[300-599], colordepth=[24-]
Using the feature set of the current request, a user agent
compute the truth value of the different feature predicates
follows
ftag true if the feature is present, false
!ftag true if the feature is absent, false
ftag=V true if the feature is present with the value V
false otherwise
ftag!=V true if the feature is not present with the value V
false otherwise
ftag=[N-M] true if the feature is present with at least
numeric value, while the highest value with which
is present in the range N-M, false otherwise. If
is missing, the lower bound is 0. If M is missing
the upper bound is infinity
As an example, with the feature
{ ( "blex" , { } ),
( "colordepth" , { "5" } ),
( "UA-media" , { "stationary" } ),
( "paper" , { "A4", "A3" } ) ,
( "x-version" , { "104", "200" } )
}
the following predicates are true
blex, colordepth=[4-], colordepth!=6, colordepth, !screenwidth, UA
media=stationary, UA-media!=screen, paper=A4, paper =!A0,
colordepth=[ 4 - 6 ], x-version=[100-300], x-version=[200-300]
and the following predicates are false
!blex, blebber, colordepth=6, colordepth=foo, !colordepth
screenwidth, screenwidth=640, screenwidth!=640, x-version=99, UA
media=screen, paper=A0, paper=a4, x-version=[100-199],
Holtman & Mutz Experimental [Page 23]
RFC 2295 Transparent Content Negotiation March 1998
6.4 Features
The features attribute, for which section 5.1 defines the
"{" "features" feature-list "}"
is used in a variant description to specify how the presence
absence of particular feature tags in the user agent affects
overall quality of the variant
feature-list = 1%feature-list-
feature-list-element = ( fpred | fpred-bag )
[ ";" [ "+" true-improvement ]
[ "-" false-degradation ]
]
fpred-bag = "[" 1%fpred "]"
true-improvement = short-
false-degradation = short-
Features attributes are used in variant descriptions (section 5).
Variant descriptions can be transmitted in Alternates
(section 8.3).
Examples are
{features !textonly [blebber !wolx] colordepth=3;+0.7}
{features !blink;-0.5 background;+1.5 [blebber !wolx];+1.4-0.8}
The default value for the true-improvement is 1. The default
for the false-degradation is 0, or 1 if a true-improvement value
given
A user agent SHOULD, and a remote variant selection algorithm
compute the quality degradation factor associated with the
attribute by multiplying all quality degradation factors of
elements of the feature-list. Note that the result can be a
greater than 1.
A feature list element yields its true-improvement factor if
corresponding feature predicate is true, or if at least one
of the corresponding fpred-bag is true. The element yields
false-degradation factor otherwise
Holtman & Mutz Experimental [Page 24]
RFC 2295 Transparent Content Negotiation March 1998
7 Remote variant selection
A remote variant selection algorithm is a standardized algorithm
which a server can choose a best variant on behalf of a
user agent. The use of a remote algorithm can speed up
negotiation process by eliminating a request-response round trip
A remote algorithm typically computes whether the Accept- headers
the request contain sufficient information to allow a choice, and
so, which variant is the best variant. This specification does
define any remote algorithms, but does define a mechanism
negotiate on the use of such algorithms
7.1 Version
A version numbering scheme is used to distinguish between
remote variant selection algorithms
rvsa-version = major "."
major = 1*4
minor = 1*4
An algorithm with the version number X.Y, with Y>0, MUST be
compatible with all algorithms from X.0 up to X.Y.
compatibility means that, if supplied with the same information,
newer algorithm MUST make the same choice, or a better choice, as
old algorithm. There are no compatibility requirements
algorithms with different major version numbers
8 Content negotiation status codes and
This specification adds one new HTTP status code, and introduces
new HTTP headers. It also extends the semantics of an
HTTP/1.1 header
8.1 506 Variant Also
The 506 status code indicates that the server has an
configuration error: the chosen variant resource is configured
engage in transparent content negotiation itself, and is
not a proper end point in the negotiation process
Holtman & Mutz Experimental [Page 25]
RFC 2295 Transparent Content Negotiation March 1998
8.2 Accept-
The Accept-Features request header can be used by a user agent
give information about the presence or absence of certain features
the feature set of the current request. Servers can use
information when running a remote variant selection algorithm
Note: the name `Accept-Features' for this header was
because of symmetry considerations with other Accept- headers
even though the Accept-Features header will generally not
an exhaustive list of features which are somehow `accepted'.
more accurate name of this header would have been `Feature-Set
Info'.
Accept-Features = "Accept-Features" ":"
#( feature-expr *( ";" feature-extension ) )
feature-expr = [ "!" ]
| ftag ( "=" | "!=" ) tag-
| ftag "=" "{" tag-value "}"
| "*"
feature-extension = token [ "=" ( token | quoted-string ) ]
No feature extensions are defined in this specification. An
is
Accept-Features: blex, !blebber, colordepth={5}, !screenwidth
paper = A4, paper!="A2", x-version=104, *
The different feature expressions have the following meaning
ftag ftag is
!ftag ftag is
ftag=V ftag is present with the value
ftag!=V ftag is present, but not with the value
ftag={V} ftag is present with the value V, and not with
other
* the expressions in this header do not fully
the feature set: feature tags not mentioned in
header may also be present, and, except for the
ftag={V}, tags may be present with more values
mentioned
Holtman & Mutz Experimental [Page 26]
RFC 2295 Transparent Content Negotiation March 1998
Absence of the Accept-Features header in a request is equivalent
the inclusion
Accept-Features: *
By using the Accept-Features header, a remote variant
algorithm can sometimes determine the truth value of a
predicate on behalf of the user agent. For example, with the
Accept-Features: blex, !blebber, colordepth={5}, !screenwidth
paper = A4, paper!="A2", x-version=104, *
the algorithm can determine that the following predicates are true
blex, colordepth=[4-], colordepth!=6, colordepth, !screenwidth
paper=A4, colordepth=[4-6]
and that the following predicates are false
!blex, blebber, colordepth=6, colordepth=foo, !colordepth
screenwidth, screenwidth=640, screenwidth!=640,
but the truth value of the following predicates cannot
determined
UA-media=stationary, UA-media!=screen, paper!=a0,
x-version=[100-300], x-version=[200-300], x-version=99,
UA-media=screen, paper=A0, paper=a4, x-version=[100-199],
8.3
The Alternates response header is used to convey the list of
bound to a negotiable resource. This list can also
directives for any content negotiation process. If a response from
transparently negotiable resource includes an Alternates header,
header MUST contain the complete variant list bound to the
resource. Responses from resources which do not support
content negotiation MAY also use Alternates headers
Alternates = "Alternates" ":" variant-
variant-list = 1#( variant-
| fallback-
| list-directive )
fallback-variant = "{" <"> URI <"> "}"
list-directive = ( "proxy-rvsa" "=" <"> 0#rvsa-version <"> )
Holtman & Mutz Experimental [Page 27]
RFC 2295 Transparent Content Negotiation March 1998
| extension-list-
extension-list-directive =
token [ "=" ( token | quoted-string ) ]
An example
Alternates: {"paper.1" 0.9 {type text/html} {language en}},
{"paper.2" 0.7 {type text/html} {language fr}},
{"paper.3" 1.0 {type application/postscript
{language en}},
proxy-rvsa="1.0, 2.5"
Any relative URI specified in a variant-description or fallback
variant field is relative to the request-URI. Only one fallback
variant field may be present. If the variant selection algorithm
the user agent finds that all described variants are unacceptable
then it SHOULD choose the fallback variant, if present, as the
variant. If the user agent computes the overall quality values
the described variants, and finds that several variants share
highest value, then the first variant with this value in the
SHOULD be chosen as the best variant
The proxy-rvsa directive restricts the use of remote
selection algorithms by proxies. If present, a proxy MUST ONLY
algorithms which have one of the version numbers listed, or have
same major version number and a higher minor version number as one
the versions listed. Any restrictions set by proxy-rvsa come on
of the restrictions set by the user agent in the Negotiate
header. The directive proxy-rvsa="" will disable variant
by proxies entirely. Clients SHOULD ignore all extension-list
directives they do not understand
A variant list may contain multiple differing descriptions of
same variant. This can be convenient if the variant uses
rendering constructs, or if the variant resource returns
representations using a multipart media type
8.4
The Negotiate request header can contain directives for any
negotiation process initiated by the request
Negotiate = "Negotiate" ":" 1#negotiate-
negotiate-directive = "trans
| "vlist
| "guess-small
Holtman & Mutz Experimental [Page 28]
RFC 2295 Transparent Content Negotiation March 1998
| rvsa-
| "*"
| negotiate-
negotiate-extension = token [ "=" token ]
Examples
Negotiate: 1.0, 2.5
Negotiate: *
The negotiate directives have the following
"trans
The user agent supports transparent content negotiation
the current request
"vlist
The user agent requests that any transparently
response for the current request includes an
header with the variant list bound to the negotiable resource
Implies "trans".
"guess-small
The user agent allows origin servers to run a custom
which guesses the best variant for the request, and to
this variant in a choice response, if the resulting
response is smaller than or not much larger than a
response. The definition of `not much larger' is left
origin server heuristics. Implies "vlist" and "trans".
rvsa-
The user agent allows origin servers and proxies to run
remote variant selection algorithm with the indicated
number, or with the same major version number and a
minor version number. If the algorithm has
information to choose a best, neighboring variant, the
server or proxy MAY return a choice response with
variant. Implies "trans".
"*"
The user agent allows origin servers and proxies to run
remote variant selection algorithm. The origin server
even run algorithms which have not been standardized. If
algorithm has sufficient information to choose a best
neighboring variant, the origin server or proxy MAY return
choice response with this variant. Implies "trans".
Holtman & Mutz Experimental [Page 29]
RFC 2295 Transparent Content Negotiation March 1998
Servers SHOULD ignore all negotiate-directives they do
understand. If the Negotiate header allows a choice between
remote variant selection algorithms which are all supported by
server, the server SHOULD use some internal precedence heuristics
select the best algorithm
8.5
The TCN response header is used by a server to signal that
resource is transparently negotiated
TCN = "TCN" ":" #( response-
| server-side-override-
| tcn-extension )
response-type = "list" | "choice" | "adhoc
server-side-override-directive = "re-choose" | "keep
tcn-extension = token [ "=" ( token | quoted-string ) ]
If the resource is not transparently negotiated, a TCN header
NOT be included in any response. If the resource is
negotiated, a TCN header, which includes the response-type value
the response, MUST be included in every response with a 2xx
code or any 3xx status code, except 304, in which it MAY be included
A TCN header MAY also be included, without a response-type value,
other responses from transparently negotiated resources
A server-side override directive MUST be included if the
server performed a server-side override when choosing the response
If the directive is "re-choose", the server MUST include
Alternates header with the variant bound to the negotiable
in the response, and user agent SHOULD use its internal
selection algorithm to choose, retrieve, and display the best
from this list. If the directive is "keep" the user agent SHOULD
renegotiate on the response, but display it directly, or act on
directly if it is a redirection response
Clients SHOULD ignore all tcn-extensions they do not understand
8.6 Variant-
The Variant-Vary response header can be used in a choice response
record any vary information which applies to the variant data (
entity body combined with some of the entity headers) contained
the response, rather than to the response as a whole
Holtman & Mutz Experimental [Page 30]
RFC 2295 Transparent Content Negotiation March 1998
Variant-Vary = "Variant-Vary" ":" ( "*" | 1#field-name )
Use of the Variant-Vary header is discussed in section 10.2.
9 Cache
To allow for correct and efficient caching and revalidation
negotiated responses, this specification extends the caching model
HTTP/1.1 [1] in various ways
This specification does not introduce a `variant-list-max-age
directive which explicitly bounds the freshness lifetime of a
variant list, like the `max-age' Cache-Control directive bounds
freshness lifetime of a cached response. However, this
does ensure that a variant list which is sent at a time T by
origin server will never be re-used without revalidation
semantically transparent caches after the time T+M. This M is
maximum of all freshness lifetimes assigned (using max-age
or Expires headers) by the origin server
a. the responses from the negotiable resource itself,
b. the responses from its neighboring variant
If no freshness lifetimes are assigned by the origin server, M is
maximum of the freshness lifetimes which were heuristically
by all caches which can re-use the variant list
9.1 Variant list
A variant list validator is an opaque value which acts as the
validator of a variant list bound to a negotiable resource
variant-list-validator = containing any ";">
If two responses contain the same variant list validator, a cache
treat the Alternates headers in these responses as equivalent (
the headers themselves need not be identical).
9.2 Structured entity
A structured entity tag consists of a normal entity tag of which
opaque string is extended with a semicolon followed by the
(without the surrounding quotes) of a variant list validator
Holtman & Mutz Experimental [Page 31]
RFC 2295 Transparent Content Negotiation March 1998
normal | variant list |
entity tag | validator | entity
-------------+----------------+-----------------
"etag" | "vlv" | "etag;vlv
W/"etag" | "vlv" | W/"etag;vlv
Note that a structured entity tag is itself also an entity tag.
structured nature of the tag allows caching proxies capable
transparent content negotiation to perform some optimizations
in section 10. When not performing such optimizations, a
tag SHOULD be treated as a single opaque value, according to
general rules in HTTP/1.1. Examples of structured entity tags are
"xyzzy;1234" W/"xyzzy;1234" "gonkxxxx;1234" "a;b;c;;1234"
In the last example, the normal entity tag is "a;b;c;" and
variant list validator is "1234".
If a transparently negotiated response includes an entity tag,
MUST be a structured entity tag. The variant list validator in
structured tag MUST act as a validator for the variant list
in the Alternates header. The normal entity tag in the
tag MUST act as a validator of the entity body in the response and
all entity headers except Alternates
9.3 Assigning entity tags to
To allow for correct revalidation of transparently
responses by clients, origin servers SHOULD generate all
entity tags for the neighboring variant resources of the
resource in such a way
1. the same tag is never used by two different variants
unless this tag labels exactly the same entity on all occasions
2. if one normal tag "X" is a prefix of another normal tag "XY",
then "Y" must never be a semicolon followed by a variant
validator
10 Content negotiation
If a request on a transparently negotiated resource yields a
with a 2xx status code or any 3xx status code except 304,
response MUST always be either a list response, a choice response,
an adhoc response. These responses MUST always include a TCN
which specifies their type. Transparently negotiated responses
other status codes MAY also include a TCN header
Holtman & Mutz Experimental [Page 32]
RFC 2295 Transparent Content Negotiation March 1998
The conditions under which the different content
responses may be sent are defined in section 12.1 for origin
and in section 13 for proxies
After having constructed a list, choice, or adhoc response, a
MAY process any If-No-Match or If-Range headers in the
message and shorten the response to a 304 (Not Modified) or 206
(Partial Content) response, following the rules in the HTTP/1.1
specification [1]. In this case, the entity tag of the
response will identify it indirectly as a list, choice, or