Knowledgebase

Brotli Compression: Better than GZIP?

Brotli Compression

Brotli is a modern alternative to Gzip, a data compression technique that offers up to a 30% reduction in static file transfer compared to other solutions .

Its history is still curious, since at first Brotli was designed more for web typography but, after evolving, it focused on other types of files such as SVG images, HTML documents, scripts and css files.

But what's the trick to making brotli better than gzip? Well, in a predefined dictionary of more than 13 thousand words. These words have been carefully selected since they are the most used symbols among the file types that you want to compress and contain, among the typical keywords, also, common words from different languages.

This dictionary 📖 is what allows you to achieve better compressions in the same, or better, possible time.

Performance of Brotli vs GZIP

There are many studies published about Brotli vs GZIP to see which of these two systems offer better levels of performance. In this example we are going to show you the results of the analysis carried out by Akamai in which it collects a sample of 1000 URLs using both compression technologies.
Compression capacity

In HTML Brotli saves 21% more space than GZIP.
In JavaScript this saving is 14%.
In CSS code the saving is 17%.

Generally speaking, GZIP is capable of reducing data by up to 78%, but Brotli's average is 82%. But as we said before, what is important is not only the compression capacity, but also the speed.

Compression speed

In terms of speed, GZIP is capable of achieving better results than Brotli at some compression levels. This makes us think that Brotli may be more suitable for compressing static data due to the greater compression capacity it has compared to GZIP, while the latter would be suitable for dynamic files, since at certain levels it plays faster.</p >

However, as Akamai points out, this only occurs in some levels of GZIP and taking into account the 11 levels that Brotli has and that the data savings is much greater, it concludes that the capacity-speed relationship of the latter is older, being able to offer better results.

Can I use Brotli on my website?

After seeing the results of Brotli vs GZIP you are probably wondering how to use Brotli on your website.

As it is a relatively new system, many servers do not yet incorporate this functionality and continue to work with GZIP. At Atlantica Digital it is already integrated into our hosting plans. In fact, currently, the most used browsers (Google Chorme, Firefox, Opera, Safari...) already support Brotli.

And you know the best? You don't have to do anything to activate it 🙂. Automatically, when a browser makes a request to your website, the server automatically returns the content compressed with Brotli.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Prestashop update

Update Prestashop To update Prestashop to the new version, the following steps will be carried...

Viruses on the web. Help!!! What are they and how do we eliminate them?

Lately, cases of websites that are infected by viruses or malicious code, without the webmaster...

How can I manage the domain?

For everything related to the administration of your domain, you must use the CPANEL control...

What is a subdomain?

Subdomains are extensions that we can use with our domain, for example, suppose that our domain...

How to publish my website?

To upload the content of your website to the server you can use any FTP client such as FileZilla,...