Lighthouse: Enable text compression
The larger those files are, the longer it takes to download them, and the longer your visitors have to wait to view the content on your page.
How does your site score on this audit?
How does enabling text compression affect page performance?
Faster downloads allow your visitors to view and interact with the content sooner.
Text compression essentially reduces the file size/payload of text-based resources, decreasing the amount of data transferred.
There are 3 types of compression algorithms recognized by GTmetrix, namely:
Brotli and Gzip are the most commonly used compression algorithms and can reduce the size of resources/pages by up to 70%.
They have also been shown to reduce page load times by up to 50%, improving all the key metrics related to your Performance Score.
How does GTmetrix trigger this audit?
GTmetrix finds all uncompressed text-based resources on your page and flags any resource if it can be reduced by at least 10% or 1.4 KB.
GTmetrix also estimates the file size savings possible through compression of the text resources.
How to enable text compression?
To enable text compression, follow the instructions below, depending on the web server used to serve your text-based resources:
1) For Apache servers
Copy and paste the following code into your
2) For other servers
Read the following guides to learn how to enable text compression on other server types:
3) For WordPress (or other CMS) Users
For WordPress users, the easiest way to enable Gzip compression is by using a caching plugin that supports enabling Gzip.
For example, WP Rocket is a caching plugin that automatically enables Gzip compression as soon as you activate the plugin.
Note that some plugins may rely on permissions to modify files on your webserver. If your caching plugin does not have permission, ask your host or use one of the aforementioned methods, depending on what server you use.