W3C home > Mailing lists > Public > public-html@w3.org > October 2009

Re: Hyperlinks and content negotiation

From: Mike Kelly <mike@mykanjo.co.uk>
Date: Mon, 19 Oct 2009 12:51:10 +0100
Message-ID: <4ADC52AE.50004@mykanjo.co.uk>
To: Larry Masinter <masinter@adobe.com>
CC: Smylers <Smylers@stripey.com>, "public-html@w3.org" <public-html@w3.org>
Larry Masinter wrote:
>> HTML does not currently provision for hyperlinks to indicate a
>> specific content-type preference for the Accept header of a given
>> request.
> In content negotiation in HTTP, the requestor (client, browser)
> tells the server the preferences, capabilities or characteristics.


The Accept request-header field can be used to specify certain media 
types which are acceptable for the response. Accept headers can be used 
to indicate that the request* is specifically limited to a small set of 
desired types, as in the case of a request for an in-line image.

* I take this definition to imply that the header is not attributed 
directly to client preferences, capabilities, or characteristics - but 
to that of a specific request. If these are not over-ridden by a 
particular hyperlink, then it makes sense for the client to provide its 
default preferences.

> Putting a "content-type" 'preference' in the HTML doesn't make
> much sense from this point of view: the producer of the HTML is
> telling the consumer of the HTML what the consumer's preferences
> should be?

Yes, in the context of a given application flow. This type of control 
SHOULD be followed, but not in a circumstance where the client does not 
support the preferences specified by such a hyperlink. All major 
browsers have a default Accept header which includes */*, so this is a 
mostly theoretical case anyway.

Some browsers already alter their deafult accept header for certain 
types of hyperlink, such as links to CSS documents.

>> Without a formal mechanism in HTML which can specify to UAs the
>> contextual content-type preference for a given hyperlink, HTML is not
>> a viable hypermedia format for systems which must rigorously leverage
>> HTTP conneg 
> What systems "must rigorously leverage HTTP connect" (and what
> does that mean?)

I was trying to describe implementations which rely exclusively on 
conneg for negotiating representations of resources and deliberately 
avoid using multiple URIs for this purpose.

JSR 311 (JAX-RS) is an example technology with this constraint



- Mike
Received on Monday, 19 October 2009 11:52:07 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:00 UTC