Re: Hyperlinks and content negotiation

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.
>   

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

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

https://jsr311.dev.java.net/nonav/releases/1.1/spec/spec3.html#x3-320003.5

--

- Mike

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