Enable text compression
"Enable text compression" means that your webpage is serving text-based resources without compression, which can slow down your site and negatively impact the user experience.
How to fix it
The solution is to enable text compression. Here's how:
Step 1: Identify Uncompressed Text Resources
First, you need to identify the text-based resources that are not being served with compression. You can use Chrome DevTools for this. Open DevTools, go to the 'Network' tab, and look for resources that are marked as 'uncompressed' in the 'Size' column.
Step 2: Enable Text Compression
Once you've identified the uncompressed text resources, you need to enable text compression. This might involve configuring your server to use Gzip or Brotli compression, or using a CDN that automatically compresses text resources.
# Apache .htaccess file
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
</IfModule>
In this example, we've configured an Apache server to use Gzip compression for plain text, HTML, CSS, and JavaScript resources.
Step 3: Test Your Changes
For an even better solution, consider testing your changes to make sure they don't break any functionality. This can help ensure that your site still works as expected with the compressed text resources.