Skip to content
Caching, Compression and Delivery

What is Brotli compression and why is it better than Gzip?

In short and in plain language

This is about a method from Google that makes files smaller. It was made for content on the web.

It packs text better than the older, common method. Smaller files load faster, most of all on mobile networks.

Modern browsers can handle it. The old method stays in place for older devices.

We set this up on the server. Nothing changes in your content.

Answer

Brotli is a compression algorithm developed by Google, tailored specifically to web content and shipping with a pre-trained dictionary of typical HTML and CSS patterns. Compared to the older Gzip, it achieves 15 to 25 percent better compression for text-based resources like HTML, CSS and JavaScript (Google, 2023). Smaller transfer sizes translate directly into shorter load times, especially on slow mobile connections.

In practice the switch is low-risk, because all modern browsers fully support Brotli. We configure the server to negotiate Brotli as the preferred algorithm and keep Gzip as a fallback for the rare older client. This way every visitor automatically benefits from the best possible compression, without anything in the content having to change. More on this on the server optimization page.