Before we start, leave your email. If the chat drops, our reply reaches you there.
Learn how Gzip and Brotli compression can dramatically reduce your website's load time and improve performance.
Compression is one of the most effective techniques to speed up website loading. When a browser requests a page, the server can compress the files before sending them, drastically reducing the amount of data transferred over the network. The browser then decompresses the files instantly before rendering them.
To give you an idea of the impact: a 100KB HTML file can be reduced to just 15-20KB after compression. For CSS and JavaScript, the reduction can reach 60-80%. On a site with 2MB of resources, compression can reduce the transfer to less than 500KB, a 4x improvement in download time.
Gzip is the most widely used compression algorithm on the web, supported by 100% of modern browsers. Developed in the 1990s, it is reliable, fast, and efficient:
Enabling it depends on your server:
Developed by Google and released in 2015, Brotli offers superior compression rates compared to Gzip:
The downside of Brotli is that real-time compression is slower than Gzip at higher levels. Therefore, the recommended practice is to use pre-compressed Brotli for static files (generated once during the build) and Gzip or low-level Brotli for dynamic content.
The best approach is to use both. Configure your server to offer Brotli as the first option and Gzip as a fallback. The browser indicates in the request header which algorithms it supports, and the server chooses the best available. This way, modern browsers receive Brotli (smaller), while older browsers receive Gzip (universal).
Compression works best on text files. Compressing already compressed files is useless or even harmful:
Compressing already compressed files wastes server CPU without reducing size, and may even slightly increase it.
To verify if your site is using compression:
There is no reason not to use compression on a website. It's free, easy to configure, and offers immediate and significant performance gains. If your site doesn't use Gzip or Brotli yet, this is likely the fastest and most impactful optimization you can make today. Enable compression and drastically reduce your website's weight.
Written by
We build websites that build themselves, for American small businesses that would rather run the business.
What can go wrong with a website, from going offline to being hacked to losing everything, and the minimal maintenance that prevents headaches, explained for non-technical folks.
Security certificate, custom domain and hosting seem like technical details, but they affect trust, search ranking and stability. Understand them without the jargon.
If the site "isn't yours," are you being scammed? Not necessarily. The difference between honest lock-in and hidden lock-in, and why the former can work in your favor.
The builder writes, designs, and structures your site with everything these articles teach. Watching it happen is free.
Full preview · No account · No credit card