Brotli is a technology that reduces the size of computer files by compressing their data. It works best with text-based files like the HTML, CSS, and JavaScript files used on websites. SVG image files and text-based fonts such as WOFF and WOFF2 can also be compressed with Brotli.
It is an alternative to the popular Gzip compression and provides several benefits, such as smaller files. Smaller files are faster to download, which improves the performance of your WordPress website.
Most major web browsers support Brotli compression. This is essential because the compressed files need to be decompressed after they are downloaded so they can be displayed in the browser.
How Does Brotli Compression Work?
Brotli compression is a method used to reduce the size of text-based files such as HTML, CSS, and JavaScript.
It identifies text phrases that are repeated and replaces them with a shorter reference to reduce the overall file size. To achieve this, a standard dictionary of commonly used words and phrases is used, as well as a dynamic dictionary that is built while analyzing the file.
You can use Brotli compression to make your website files smaller. It is supported by all popular web browsers, server software, and the best WordPress hosting companies.
The smaller files can be downloaded more quickly when someone visits your site, making it load faster. Your web browser automatically decompresses and displays the files after they are downloaded.
How Does Brotli Compression Speed Up Your WordPress Website?
Brotli compression can make your website load 15-20% faster without changing the way it looks or works.
Website speed test tools like Google PageSpeed Insights often recommend enabling text compression to improve website performance. In the following screenshot, it estimates the web page will load 3.15 seconds faster with Brotli or Gzip compression enabled.
A faster website improves the user experience and can bring in more sales and conversions for your business.
Faster loading times are also a ranking factor in search engines. That means that enabling Brotli compression on your website can also improve your SEO.
Brotli compression is for text files, not images or videos. However, there are other techniques you can use to optimize images for the web on your WordPress site.
On the other hand, using Brotli can compress SVG vector image files by 50-80% because they are XML-based.
How to Enable Brotli Compression With a WordPress Caching Plugin
You can enable Brotli compression by installing a WordPress caching plugin that supports it. Some of these plugins have Brotli enabled by default, and with others, you will need to enable it in the plugin’s settings.
For example, Cloudflare enables Brotli compression by default to unlock 15-20% speed improvements. This setting is on when you activate the plugin.
How to Check That Brotli Compression is Enabled
Many hosting providers automatically enable Brotli or Gzip compression for you. Companies that enable Brotli compression by default include SiteGround, WP Engine, Hostinger, and GreenGeeks.
You can test whether compression is enabled on your website using an online Gzip and Brotli compression checker tool. Simply visit the tool’s website and enter your site’s URL. You will see a ‘GZIP Is Enabled’ message if it is working.
If it is not working, then you can enable Gzip on your site by installing a caching plugin like we showed you ealier and then test your site again.
What’s the Difference Between Brotli & Gzip Compression?
Gzip compression has been around for a long time. It is a free and open-source compression program released way back in 1992 and became an industry standard, being supported by the best caching plugins and CDNs.
The Brotli data compression algorithm is much more recent and was developed by Google between 2013 and 2016. It uses more modern and complex techniques that identify and replace repetitive patterns more effectively than Gzip.
This means that Brotli can compress files faster and with more effective compression than Gzip. You can expect to achieve compression ratios of 15-20% compared to Gzip, and page load times 5-10% faster.
As a result, Brotli adoption has grown quickly among leading CDNs and caching plugins.
If you use a plugin that supports Brotli compression, then enabling it will improve your website performance, resulting in improved user experience and SEO.
We use Brotli compression on the WPBeginner website.
We hope this article helped you learn more about Brotli compression in WordPress. You may also want to see our Additional Reading list below for related articles on useful WordPress tips, tricks, and ideas.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.