Accept-Encoding tells the server what encoding the client accepts. Encoding is mostly used for compression.
|Encoding||The type of encoding to use. This can also be a |
|QualityFactor||The quality factor in the format |
Accept-Encoding takes a number of encoding and includes an optional preference for which one the server should use. The encoding is one from the list
of available encodings at IANA registry. For example
The encoding is separated by commas with an optional quality factor (using a
;q=) that is
used the clients preference for using this encoding. The quality factor has a value from 0 to 1 with the higher the number the more preference for that encoding.
If this header is not included then the client does not state any preference for the encoding. It does not mean that the client supports all encodings.
A value of
identity is always acceptable unless you reject it with
The server uses
Content-Encoding to inform the client what encoding it is using.
If the server can't find an acceptable charset to reply with then it should send a 406 (not acceptable) response or ignore this header and not doing any content negotiation.