← Back to Blog

Your server is sending gzip. In 2026, that's leaving 20% on the table.

Your server is sending gzip. In 2026, that's leaving 20% on the table.

You're compressing your assets. Good. But you're probably still using gzip, and that's been the second-best option since 2017.

Brotli (Content-Encoding: br) ships 15-25% smaller files than gzip at comparable compression levels. Every major browser has supported it since 2017. Every major CDN supports it. And yet, most servers and CDN configurations still default to gzip because nobody changed the settings.

How content encoding works

When your browser sends a request, it includes an Accept-Encoding header listing the compression algorithms it supports. A modern Chrome sends Accept-Encoding: gzip, deflate, br, zstd. The server picks the best one it supports, compresses the response, and sets the Content-Encoding header to tell the browser how to decompress.

The negotiation is automatic. The problem is on the server side: if your server or CDN only has gzip configured, it ignores the browser's Brotli support and sends the larger gzip version.

Brotli vs gzip vs zstd

gzip has been the web's compression standard since the late 1990s. It's fast to compress, fast to decompress, and universally supported. At its highest compression level (9), a typical HTML file compresses to about 20-25% of its original size.

Brotli was developed by Google and released in 2015. It uses a larger dictionary of common web patterns (HTML tags, CSS properties, JavaScript keywords), which means it compresses web content more efficiently than general-purpose gzip. At level 11 (maximum), Brotli typically produces files 15-25% smaller than gzip level 9. The trade-off: Brotli level 11 is significantly slower to compress, so most CDNs use Brotli 4-6 for dynamic content and pre-compress static assets at level 11.

zstd (Zstandard) is the newest option, supported in Chrome 123+ and Firefox 126+. It offers compression ratios similar to Brotli with faster decompression. Safari support is still pending as of early 2025. It's worth watching but not yet a primary strategy.

Why CDNs default to gzip

Most CDN providers support Brotli but don't enable it by default on all configurations. Cloudflare enables it automatically on their proxy. AWS CloudFront requires you to configure a custom cache policy that includes Brotli. Fastly requires VCL configuration. Netlify compresses with Brotli automatically for assets served from their CDN edge.

The result: sites behind a CDN often think they have modern compression but are actually serving gzip because the CDN configuration wasn't updated. The only way to know is to check the Content-Encoding response header.

HTTP/3 and Alt-Svc

Compression is one piece of the transfer optimization puzzle. HTTP/3 (over QUIC) eliminates head-of-line blocking that slows HTTP/2 connections on lossy mobile networks. Your server advertises HTTP/3 support via the Alt-Svc response header:

Alt-Svc: h3=":443"; ma=86400

HTTP/3 adoption is growing but requires specific server and CDN support. Cloudflare, Google Cloud, and Fastly support it. Apache and Nginx have experimental modules. If your CDN supports it, enabling H3 is usually a toggle in the dashboard.

What the tool checks

The Compression Codec Audit fetches your page and examines:

  • Content-Encoding header (gzip, br, zstd, or none)
  • Whether the server negotiates Brotli when the client supports it
  • Alt-Svc header for HTTP/3 advertisement
  • Transfer size versus uncompressed size ratio
  • Whether static assets (CSS, JS) use different encoding than HTML

The tool reports the compression ratio and estimates the byte savings from upgrading to Brotli. For a typical 200KB HTML page, the difference between gzip and Brotli is 15-40KB. Across a site serving thousands of pages per day, those bytes compound into real bandwidth savings and faster time-to-interactive for mobile users.

How to enable Brotli

Nginx: Add brotli on; brotli_types text/html text/css application/javascript; to your config (requires the ngx_brotli module).

Apache: AddOutputFilterByType BROTLI_COMPRESS text/html text/css application/javascript (requires mod_brotli, available since Apache 2.4.26).

Cloudflare: Enabled by default on all plans. No configuration needed.

AWS CloudFront: Create a cache policy that includes br in the Accept-Encoding compression support setting.

Netlify: Automatic for all static assets. No configuration needed.

For static sites, pre-compressing assets at build time with Brotli level 11 gives you maximum compression without any runtime CPU cost. Tools like brotli-cli can be added to your build pipeline in one line.

If you're running a site where every kilobyte of transfer cost matters, whether it's mobile performance or bandwidth bills, The $97 Launch ($9.99 on Kindle) covers the infrastructure optimizations that keep a lean site competitive.

Fact-check notes and sources

Related reading

This post is informational, not hosting-consulting advice. Tool mentions are descriptive. No affiliation with CDN providers is implied.

← Back to Blog

Accessibility Options

Text Size
High Contrast
Reduce Motion
Reading Guide
Link Highlighting
Accessibility Statement

J.A. Watte is committed to ensuring digital accessibility for people with disabilities. This site conforms to WCAG 2.1 and 2.2 Level AA guidelines.

Measures Taken

  • Semantic HTML with proper heading hierarchy
  • ARIA labels and roles for interactive components
  • Color contrast ratios meeting WCAG AA (4.5:1)
  • Full keyboard navigation support
  • Skip navigation link
  • Visible focus indicators (3:1 contrast)
  • 44px minimum touch/click targets
  • Dark/light theme with system preference detection
  • Responsive design for all devices
  • Reduced motion support (CSS + toggle)
  • Text size customization (14px–20px)
  • Print stylesheet

Feedback

Contact: jwatte.com/contact

Full Accessibility StatementPrivacy Policy

Last updated: April 2026