167
edits
m (Thexa4 moved page Content Type Negotiation to Content Negotiation) |
No edit summary |
||
| Line 4: | Line 4: | ||
== Mechanism == | == Mechanism == | ||
# When a client makes a request to a server it supplies all the formats it supports in the [[Accept Header]]: <code>Accept: text/html,application/xhtml+xml</code>. | |||
# The server looks at the list the client sent and excludes all formats it does not support. | |||
# If there are no common formats, the server either responds with [[406 Not Acceptable]] or it picks a fallback format like <code>text/html</code>. | |||
# If there are common formats left, the server picks the one the client marked with the highest priority. | |||
# The server then returns the content that matches the negotiated format. | |||
== Content-Language Negotiation == | |||
Aside from negotiating the [[Content-Type Header | Content-Type]] of the response, HTTP also allows clients to negotiate the language of the returned data. This is done in the same way as above but then with the [[Accept-Language Header]]. | |||