HTTP Accept-Encoding Header
Indicates which content encoding (compression algorithm) the client supports. The server may compress the response body using one of these methods.
Purpose
Enables the server to compress the response, reducing bandwidth usage and improving load times.
Accept-Encoding: gzip Accept-Encoding: compress, gzip Accept-Encoding: br Accept-Encoding: identity (no compression)
Code Examples
See how to use the Accept-Encoding header in different tools and languages.
Related Headers
Content-Encoding
Indicates which compression algorithm was applied to the response body. The client must use the same algorithm to decompress the data.
Content-Type
Indicates the media type (MIME type) of the resource being sent. Tells the client how to interpret the response body.
Vary
Determines how the response should be cached based on request headers. Ensures caches serve the correct version based on varying request criteria.
Transfer-Encoding
Specifies the transfer encoding applied to the message body. Chunked encoding is used when the response size is not known in advance.