Proactive Content Negotiation

Description
When content negotiation preferences are sent by the user agent in a request to encourage an algorithm located at the server to select the preferred representation, it is called proactive negotiation (a.k.a., server-driven negotiation). Selection is based on the available representations for a response (the dimensions over which it might vary, such as language, content-coding, etc.) compared to various information supplied in the request.

Advantages and Disadvantages
Advantages Disadvantages
  • The server avoids the back and forth because the client sends the preferences to the server which makes its best guess and sends them with the answer.
  • The sever does not need to describe the selection algorithm to the client to make a choice.
  • It is impossible for the server to accurately determine what might be "best" for any given user, since that would require complete knowledge of both the capabilities of the user agent and the intended use for the response.
  • Having the user agent describe its capabilities in every request can be both very inefficient (given that only a small percentage of responses have multiple representations) and could be a potential risk to the user's privacy.
  • It complicates the implementation of an origin server and the algorithms for generating responses to a request.
  • It limits the reusability of responses for shared caching.

References
[{{ reference.id }}] : {{ reference.title }}