squirrelscan
GitHub

No compression detected: gzip and Brotli on the response

A text response served with no Content-Encoding, or with compression explicitly disabled. squirrel reads the headers on every page.

What response compression is

A client advertises what it can decode with Accept-Encoding, and a server that supports it returns the body compressed and names the scheme in Content-Encoding. On HTML, CSS, JavaScript and JSON the saving is large, because text repeats itself.

Brotli, sent as br, compresses text better than gzip at the same cost to decode, and every current browser supports it. gzip remains the safe default. identity names the no-op coding: the response was sent without compression and says so explicitly.

What squirrel checks

The rule runs on every crawled page and emits one check named compression:

  • At info status with the message Content type may not benefit from compression when the content type is not text, JSON, JavaScript or XML. Nothing else runs.
  • Passing with Brotli compression enabled (optimal) when Content-Encoding contains br.
  • Passing with <encoding> compression enabled when it contains gzip or deflate.
  • Warning with Compression explicitly disabled when the encoding is exactly identity.
  • At info status with Unknown content encoding: <encoding> for anything else.
  • Warning with Chunked transfer without compression when there is no Content-Encoding and Transfer-Encoding is chunked.
  • Failing with No compression detected (NKB uncompressed) when there is no encoding at all and the HTML is over 1,000 characters, with an estimated saving in the details.
  • At info status with Small response - compression not critical when there is no encoding and the body is 1,000 characters or fewer.

The size test measures the decoded HTML the crawl holds, in characters rather than bytes. A content type counts as compressible when it contains text/, application/json, application/javascript, application/xml, +xml or +json.

This rule is the one that scores a page served without compression. perf/bad-caching also counts the uncompressed pages across the site, in its bad-caching-compression check, at info status, which does not move the score, so one missing compression setting costs the score once.

On a local or private-network host, such as localhost or 192.168.1.10, the rule is skipped and left out of the score, because a dev server is not the production edge. See Transport and delivery rules do not apply.

How to fix it

On nginx:

gzip on;
gzip_types text/html text/css application/javascript application/json;
brotli on;
brotli_types text/html text/css application/javascript application/json;

Behind a CDN the switch is usually on by default, and the thing to check is that the origin is not sending Content-Encoding: identity, which some proxies pass through unchanged.

The common false positive is a response the crawl fetched without offering compression. squirrel sends a normal Accept-Encoding, so this is rare, but an origin that varies on user agent can answer differently for a crawler than for a browser.

Rule IDperf/compression
CategoryPerformance
ScopePer-page
Severitywarning
Weight6/10

Enable / disable

Disable this rule

[rules]
disable = ["perf/compression"]

Disable all Performance rules

[rules]
disable = ["perf/*"]

Enable only this rule

[rules]
enable = ["perf/compression"]

enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.

Performance findings ship in every audit next to the SEO, security and agent experience rules. See Core Web Vitals for how an agent works through a report.

References

Check your site

Run squirrel audit https://example.com and open the Performance section of the report. Each page reports the Content-Encoding it returned. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.

Type to search…

↑↓ navigate↵ openesc close