PERFORMANCE · SEO GLOSSARY

Gzip / Brotli Compression

Gzip and Brotli are server-side text compression algorithms that reduce the size of HTML, CSS, and JavaScript files transferred over HTTP — typically 60–80% smaller than uncompressed. Enabling compression is one of the simplest server-level performance improvements and reduces Time to First Byte (TTFB) for text resources.

Definition

When a browser makes an HTTP request, it sends an Accept-Encoding header listing compression algorithms it supports (e.g., Accept-Encoding: gzip, deflate, br). The server can compress the response body using a matching algorithm and indicate the compression in the Content-Encoding response header. The browser decompresses the body before parsing — this decompression is fast and CPU-cheap compared to the bandwidth saved. **Gzip**: the long-established standard, supported universally. Achieves 60–80% compression on typical HTML/CSS/JS files. Available in virtually all web servers (nginx: gzip on; gzip_types text/html text/css application/javascript; Apache: mod_deflate with AddOutputFilterByType). **Brotli**: Google\'s newer algorithm, achieves 15–25% better compression than Gzip at equivalent CPU cost. Supported in all modern browsers via the br encoding. Requires explicit server configuration (nginx: brotli_static on; Cloudflare, Fastly, and most CDNs enable Brotli automatically). **What to compress**: text resources — HTML, CSS, JavaScript, JSON, XML, SVG. Do NOT gzip already-compressed binary formats — JPEG, PNG, WebP, AVIF, WOFF2, MP4, ZIP. These are already compressed and re-compressing them wastes CPU with no size benefit. **Compression verification**: check response headers — look for Content-Encoding: gzip or Content-Encoding: br in the response to a request from a browser that sends Accept-Encoding: gzip, br. **CDN compression**: most CDNs (Cloudflare, AWS CloudFront, Fastly, Vercel, Netlify) apply Brotli/Gzip compression automatically at the edge — meaning hosting on a CDN typically makes this a non-issue without any server configuration.

Why it matters for SEO

Uncompressed text resources are a preventable source of slow page loads. A 500KB JavaScript bundle served uncompressed vs. 120KB gzip-compressed means 380KB more data must transfer before the JavaScript can execute — adding hundreds of milliseconds of delay on mobile connections. Enabling compression is one of the simplest and highest-ROI server configurations, particularly for sites self-hosting without a CDN. It directly reduces Time to First Byte (TTFB) for HTML and the download time for CSS and JavaScript, improving FCP and LCP.

How DeepSEOAnalysis checks this

The audit checks Content-Encoding response headers on crawled pages and linked resources to detect whether compression is enabled. Pages serving uncompressed HTML are flagged as a performance optimisation. Real-world performance impact is measured via CrUX field data for TTFB, LCP, and FCP.

Useful tools and resources

See how your site scores on Gzip / Brotli Compression.

The free DeepSEOAnalysis audit checks gzip / brotli compression and 100+ other signals. Full report, no signup.

Run a free audit →