Compression: Send Text Responses in a Smaller Payload

HTML, CSS, JS, JSON, and XML compress well. Shipping them uncompressed wastes bandwidth and time.

Launch pages benefit from faster delivery on both strong and weak connections.

What It Is

Compression means the server encodes response bodies with formats such as Brotli or gzip so the browser downloads fewer bytes.

Why It Matters

  • It reduces transfer size for text-heavy responses.
  • It can improve perceived speed, especially on slower networks.
  • It lowers bandwidth waste at scale.

Best Practices

  1. Enable Brotli where available, or gzip as a fallback.
  2. Apply compression to HTML, CSS, JS, JSON, XML, and similar text formats.
  3. Verify the CDN or server is not stripping compression unexpectedly.

Common Mistakes

  • Serving HTML uncompressed.
  • Compressing only static assets but not the main document.
  • Assuming local dev behavior matches production proxies.

Quick Checklist

  • Compression enabled.
  • HTML response compressed.
  • Public stack preserves compression.

Final Takeaway

Compression is simple performance hygiene. Public pages should not skip it.

Run this check on your own page

Open the tool and analyze a public URL to see this section inside the full report.

Back to checker

Continue to your tool account

Use Google or email. New tool accounts are created automatically the first time you continue.

We'll email you a 6-digit one-time code. Entering it on the next screen signs you in and creates your tool account automatically if needed.