Request negotiation · Request header
Accept-Encoding
Which content encodings (compressions) the client accepts.
What is Accept-Encoding?
Advertises which compression algorithms the client can decode. Servers pick one and set Content-Encoding to match.
Typical usage
Set by every modern browser and HTTP client automatically.
Examples
Accept-Encoding: gzip, br, deflateSpecification
RFC 9110 §12.5.3
Frequently asked questions
What is the Accept-Encoding HTTP header?
Advertises which compression algorithms the client can decode. Servers pick one and set Content-Encoding to match.
Is Accept-Encoding a request or response header?
Accept-Encoding is a request header — the client sends it to the server. Set by every modern browser and HTTP client automatically.
What does a Accept-Encoding header look like?
A typical Accept-Encoding header looks like: Accept-Encoding: gzip, br, deflate.
Related headers
Content-Encoding
How the body has been transparently encoded (usually compressed).
Vary
Which request headers cause different cached variants of the response.
Accept
Which media types the client can process.
Accept-Language
Preferred human languages for the response.
User-Agent
The client software identifying itself.
Host
The requested host name and port.