Evolution/Content Negotiation

From W3C Wiki

This section is a placeholder.

One of the important techniques for extending the capability of the Web: allow new capabilities to be explored if receivers can process them.

Content negotiation providing a way that senders can examine the preferences, capabilities and characteristics of the receiver and prepare content that is best adapted to the receiver.

This allows new capabilities to be deployed selectively. Other ways of accomplishing this kind of extensibility is through scripting and server sniffing.

There was originally a desire to do content negotiation with internet media types and "Accept" headers; that didn't work work well.

When two parties communicate and share more than one language (or version of a language) they might use for communication, the idea of "content negotiation" involves an exchange protocol where a choice among these methods is made. content negotiation is common: fax machine twirps to each other when initially connecting, negotiating resolution, compression methods and so forth. In Internet mail, "content negotiation" consists of the sender preparing and sending multiple alternative messages, and including them all in the same message.

For example, HTML email also often contains alternatives in plain text, labeled with content-type of "text/html" and "text/plain" respectively. In HTTP, a request might include "Accept" or "Accept-Charset" parameters which allow the responding web server to match the language of the response to the capabilities of the client. The "User-Agent" parameter in a HTTP request is often used for this purpose.

Content negotiation based on "Accept" and content-type has only been successful in limited contexts. Negotiating the content-type (e.g. HTML vs. Word vs. PDF) doesn't really happen: people want to make an explicit choice of downloading an MS Office or PDF depending on the goals they have that moment, instead of letting software pick a format for them. Negotiation of HTML vs. XHTML happens but is rare in the big picture and rarely offers true value to users.

  • History
  • By MIME type
  • by User-Agent
  • by script examination of recipient state
  • by fallback
  • negotiation of language, charset
  • UAPROF
  • CCPP
  • how it happens today
  • use (or not) of version numbers
  • negotiation of API levels
  • MIME multipart/alternative