PageSpeed Matters
    PageSpeed Matters
    Optimization Techniques · Glossary

    Compression (Brotli / Gzip) · Definition & Explanation 2026

    Text compression (Brotli and Gzip) reduces the transfer size of HTML, CSS, JavaScript, and other text resources by 60–90%. It's one of the easiest, highest-impact performance optimizations available — typically requiring only server/CDN configuration with zero code changes.

    Brotli, developed by Google, uses a pre-defined dictionary of common web patterns to achieve 15–25% better compression than Gzip. All modern browsers support Brotli (since 2016). Gzip remains the universal fallback.

    Lighthouse flags uncompressed text resources as a significant performance issue. Not enabling compression is one of the most common and easily fixable performance mistakes.

    Updated 2026-02-28
    M
    By Matt Suffoletto

    TL;DR — Quick Summary

    Gzip compresses text resources by 60–80%. Brotli compresses 15–25% better than Gzip. Both are applied server-side transparently. Enabling compression is one of the easiest, highest-impact optimizations.

    What is Compression (Brotli / Gzip)?

    Brotli is a modern compression algorithm by Google that uses a pre-defined dictionary of common web patterns, achieving 15–25% better compression than Gzip for text resources. Identified by the 'br' content-encoding header. Supported by all modern browsers since 2016.

    Gzip is the universal web compression standard for over two decades. Compresses text by 60–80%. Remains the fallback when Brotli isn't available.

    Both are applied transparently: the browser sends `Accept-Encoding: br, gzip` and the server responds with the best supported encoding. Compression is applied after minification — they're complementary, not alternatives.

    History & Evolution

    • 1995 — Gzip becomes the standard web compression method.
    • 2015 — Google releases Brotli, optimized for web content.
    • 2016 — All major browsers add Brotli support.
    • 2020 — Brotli becomes the default on major CDNs (Cloudflare, AWS CloudFront).
    • 2025–2026 — Brotli is the standard. Gzip remains as fallback. Zstandard (zstd) emerging as a potential future alternative.

    Frequently Asked Questions

    For step-by-step optimization, platform-specific fixes, code examples, and case studies, read our full guide:

    The Ultimate Guide to Web Hosting, CDN & Infrastructure for Speed: TTFB, Caching, Edge Workers & Traffic Resilience in 2026

    Struggling with Compression (Brotli / Gzip)?

    Request a free speed audit and we'll identify exactly what's holding your scores back.