Glossary
Gzip & Brotli Compression
Gzip and Brotli are HTTP compression methods that shrink text-based responses before sending, cutting transfer size and speeding up page loads.
Gzip and Brotli are compression algorithms used to shrink HTTP responses — HTML, CSS, JavaScript, and other text — before they travel over the network, reducing bytes transferred and speeding up loads.
How they compare
- Gzip — universally supported and fast; the long-standing default.
- Brotli — newer, developed by Google, typically compresses text 15–25% smaller than gzip at comparable speed, and is now supported by all modern browsers.
How it is negotiated
The browser sends Accept-Encoding: gzip, br; the server replies with Content-Encoding: br (or gzip) and the compressed body. It applies only to compressible text — already-compressed images and video are skipped.
Why it matters for hosting
Compression is one of the cheapest performance wins, improving core-web-vitals and reducing bandwidth. Servers like nginx, apache, and litespeed, and every cdn, support it — though Brotli sometimes needs explicit enabling.
See also
