The server compresses the page

Text files such as HTML, CSS and scripts shrink a lot when the server compresses them before sending. Without it every visitor downloads several times more than needed.

  • Speed
  • 2 of 148 points
  • Usually needs a developer

In Google's PageSpeed Insights this is now one line inside "Document request latency".

Older versions of Google's test called it: "Enable text compression".

What it means

Text files such as HTML, CSS and JavaScript shrink a lot when they are compressed. A server can compress them before sending, and every browser unpacks them without anyone noticing. It is one setting, and it often cuts the size of those files by more than half.

The two common methods are gzip and Brotli. Our rule passes when the page is sent with either. Without compression, every visitor downloads several times more than needed.

What causes it

  • Compression was never switched on at the host.
  • A proxy or a security service in front of the site removes it.

How to fix it

  1. Turn on gzip or Brotli at the host. Most control panels have a switch for it.
  2. Or put the site behind a CDN such as Cloudflare, which compresses by default.
On an Apache server, a few lines in the .htaccess file switch it on.
Example
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript
</IfModule>

On your platform

WordPress
Most caching plugins have a "gzip compression" switch. Many hosts also have one in their control panel.
Shopify, Wix, Squarespace, Webflow
These platforms compress by themselves. There is no setting to change. If this check fails on one of them, run the test again.
Cloudflare
Sites behind Cloudflare get compression by default.

Check it yourself

In the browser developer tools, click the page request in the Network tab and look for a "content-encoding" response header.

Or run a free audit: it checks this and 53 other things on your page in about a minute, and shows the proof for each one.

How we test it

What we look at
Google's test of how the page itself is sent, or the server's Content-Encoding header.
It passes when
HTML, CSS and scripts are sent compressed (gzip, Brotli or similar).
What it is worth
2 of 148 points in rule book 0.5, in Speed. A rule that cannot be checked on a page counts neither for nor against it.

Questions

How do I check whether compression is on?

Open the developer tools, click the page request in the Network tab and look at the response headers. "content-encoding: gzip" or "br" means it is on.

Should images be compressed this way too?

No. Images are already compressed in their own format. This setting is for text files.

Sources

Where to read more, and where to check what this page says. Opened and read on 20 and 24 November 2026.

Also useful: what a good website score is, how we compare with PageSpeed Insights and the full rule book.

Does your website have this problem?

A free audit checks this and 53 other things, and shows the proof. About a minute, no email needed.