How to enable text compression?

How to enable text compression?

Free Complete Site Audit

Access a full website audit with over 300 technical insights.

Something went wrong. Please, try again later.
Trusted by
Sitechecker trusted company

Free Website SEO Checker & Audit Tool

  • Scan the site for 300+ technical issues
  • Monitor your site health 24/7
  • Track website rankings in any geo

Text compression is a very simple and effective method to save bandwidth and speed up your sites. And you need to use this method to improve the interaction with your users. But be careful that some of your data is not lost during text compression.

What does “Enable text compression” mean?

This issue means that the page includes text resources that are not served with compression. Consequently, your pages load slowly, which can harm your business.

You can read additional information about the text compression using Lighthouse:

https://web.dev/uses-text-compression/

What triggers this issue?

Some or all of the pages don’t have a content-encoding header set to br, gzip, or deflate. Each of these file formats is used for file compression. If you use one of them, the browser can download the zipped files, extract them, and show them to users.

How to check the issue?

We recommend you scan your site with online or offline crawlers. They show you problem pages that you need to correct. A crawler can take text-based resources and compress them with GZIP to determine potential savings of compressions. The tool doesn’t highlight a page:

  1. If the potential compression savings is a maximum of 10% of the original size
  2. If the original size of the response is less than 1.4KiB

Find out not only the information about text compression, but also the presence of technical errors on it!

Conduct a full audit to find out and fix all the site level and page level issues on your website.

Something went wrong. Please, try again later.

Why is this important for my website?

You’ve created a web application (on WordPress or Shopify) with a front-end (Next js or Vue.js) and a back-end (Java or Laravel) for your business. But you also want to make your pages load faster. Therefore, you need to enable text compression that helps you to minimize the total bytes sent over the network with no negative impact to the user. Text-based resources like HTML, CSS and JavaScript will become smaller, and they will download more quickly. So you cannot optimize your site without file formats used for text compression.

You can watch the video by Moz about the crucial things of your site’s page speed and how to improve it:

How to fix the issue?

1. You need to enable text compression on your server (Apache, NGINX)
2. When a browser requests a resource, it will use the Accept-Encoding HTTP request header to point what compression algorithms it supports:

  • Brotli. It’s the most effective way to decrease the file size of text-based resources
  • GZIP. It’s a fallback for Brotli, which is supported in all major browsers. You can use it after installing the plugin WP Super Cache on your WordPress site

3. Your server returns the Content-Encoding HTTP response header to point what compression algorithm is used

If you use Apache servers, you can modify the code of the .htaccess file to enable text compression.

Besides, you can use a data compression ratio. It’s a measurement of the relative reduction in the size of data representation produced by a data compression algorithm. This ratio expresses the division of uncompressed size by compressed size.

Fast Links

You may also like

View More Posts
How to Fix the Specific HTML Viewport Width?
Site Audit Issues
How to Fix the Specific HTML Viewport Width?
Ivan Palii
Mar 13, 2024
How to fix the issue when JavaScript file size is over 25 KB
Site Audit Issues
How to fix the issue when JavaScript file size is over 25 KB
Ivan Palii
Oct 31, 2022
How to fix URLs with more than three parameters
Site Audit Issues
How to fix URLs with more than three parameters
Ivan Palii
Oct 31, 2022
close