DELAPARRA
Index
Color
NL
Category: HTTP headers

Accept-Encoding

Explained by Updated

What is Accept-Encoding?

Accept-Encoding: Which compression algorithms the client supports for the response body. Accept-Encoding tells the server which compression methods the client understands, such as gzip, br for Brotli, or zstd. The server compresses the response with one of them and says which in the Content-Encoding header. Compression makes a large difference for text. HTML, CSS, JavaScript and JSON often shrink to a fifth or less of their original size. That means faster pages, especially on mobile connections, and lower bandwidth costs.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Accept-Encoding

What should you keep in mind with Accept-Encoding?

Browsers send this header automatically, so the work is on the server side. Make sure your web server or CDN compresses text responses, and consider precompressing static files with Brotli at build time, so the server does not compress the same file on every request. Images such as JPEG and WebP are already compressed, so compressing them again only wastes processor time.

What does an example of Accept-Encoding look like?

Accept-Encoding: gzip, br

At a glance

CategoryHTTP headers
Explained by
Updated

More HTTP headers terms

All terms starting with A

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.