What is Brotli Compression?
Brotli is a lossless compression algorithm developed by Google, offering higher text compression ratios than gzip, used by CDNs to reduce page load times.
Brotli is a lossless data compression algorithm and format specified in RFC 7932, released by Google in 2015. Its primary design goal is the efficient compression of web content, specifically text-based assets such as HTML, CSS, and JavaScript. Brotli achieves compression ratios 20-26% smaller than zlib's deflate (gzip) for typical web text, at comparable decompression speeds.
The algorithm uses a combination of a context model, a dynamic dictionary, and a form of LZ77 sliding window. Brotli includes a built-in static dictionary of common English words and web strings, which improves compression on short documents and HTTP headers. Decompression is fast enough for real-time browser use; most modern browsers have supported Brotli since 2016 (Chrome 49, Firefox 44). Content negotiation uses the Accept-Encoding request header with the token 'br'. A server or CDN sends Content-Encoding: br if the client indicates Brotli support.
In the CDN and performance stack, Brotli is typically applied to compress static text assets at the origin or at the edge. A CDN may pre-compress files at the highest compression level (quality 11) and serve them to clients that advertise support. For dynamic content, intermediate compression levels (quality 4-6) balance CPU cost against size reduction. Brotli complements other optimizations such as HTTP/2 multiplexing, caching headers, and image compression. Brotli is most effective on text; binary formats (images, video) are usually not compressed further, or are compressed with lossy methods.
Key facts
- Defined in RFC 7932 (2016), standardized by IETF.
- Typically delivers 20-26% better compression than gzip for HTML/CSS/JS.
- Uses a 120KB static dictionary of common web strings for better short-file compression.
- Most CDNs support pre-compression at maximum quality level (11) for static assets.
- Browser support since 2015-2016 (Chrome, Firefox, Safari, Edge). Negotiated via Accept-Encoding: br.
How it works in practice
Related terms
References
More in CDN & Performance
Apdex Score
The Apdex Score is a standardised metric that measures user satisfaction with application performance by comparing response times against predefined target and tolerable thresholds.
Bandwidth Throttling
Bandwidth throttling is the intentional reduction of data transfer speed by a network operator or service provider to manage congestion, enforce usage policies, or control costs.
Cache Hit
A cache hit occurs when a requested resource is found in a CDN edge cache and served directly to the client, bypassing the origin server entirely.
Cache Invalidation
Cache invalidation is the explicit removal of stored web objects from a cache so that new requests must revalidate or refetch them from the origin server.
Cache Miss
A cache miss occurs when a requested resource is not found in a CDN or proxy cache, forcing the request to be forwarded to the origin server and then storing the response for future requests.
CDN
A CDN (Content Delivery Network) is a geographically distributed network of proxy servers and data centers that deliver web content to users from the nearest edge location, reducing latency and offloading origin servers.
Core Web Vitals
Core Web Vitals are a set of three real-world user experience metrics (LCP, INP, CLS) defined by Google to quantify loading, interactivity, and visual stability on web pages.
Cumulative Layout Shift
Cumulative Layout Shift (CLS) is a Core Web Vital metric that measures the sum of all unexpected layout shift scores during a page's lifespan, quantifying visual stability.
Edge Computing
Edge computing is a distributed computing model that processes data and runs application logic at Points of Presence (PoPs) close to end users, minimizing round-trip latency and bandwidth usage compared to centralized cloud regions.
Image Optimization
Image optimization reduces image file size by selecting modern formats (WebP, AVIF), resizing to display dimensions, and tuning quality, improving page load speed and bandwidth usage.