Dimension: Encoding

Description
If a user wants the response to be encoded using a particular compression algorithm for example, in HTTP the user can express it using the Accept-Encoding header. The syntax of the header is:
Accept-Encoding = ( encoding-type [ weight ] ) encoding-type = ( gzip / compress / deflate / br / identity / * )

Use cases

Examples
As example in the use case Multiple formats and multilingual site., the client sends the request:
curl --location --request GET 'www.museum.example.com/artwork/45' \ --header 'Accept-Encoding: deflate, gzip;q=1.0, *;q=0.5'
And the server answer with the response:
HTTP/1.1 200 OK
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 2487 ...

References
  • [47]: Hypertext transfer protocol (HTTP/1.1): Semantics and content.