Performance
Response Compression
Enabling gzip or Brotli compression reduces page size by 60-80%, making your site load significantly faster.
medium severityWhat is this?
HTTP compression compresses your server's responses before sending them over the wire. The browser decompresses them automatically. A 200KB HTML file compresses to ~40KB with gzip, and ~30KB with Brotli - making your pages 5-6x faster to transfer.
Your server indicates compression with the Content-Encoding header:
Content-Encoding: gzip Content-Encoding: br
Why it matters
- 60-80% reduction in transfer size - free performance improvement with no code changes
- Faster page loads on all connections - especially important for mobile users on slower connections
- Lower bandwidth costs if you're paying for egress
- Better Core Web Vitals scores → better SEO rankings
How to fix it
How to enable depends on your server:
Providers & tools
| Platform/Server | How to enable compression |
|---|---|
| Cloudflare | Enabled automatically for HTML, CSS, JS - no action needed |
| Vercel | Enabled automatically |
| Netlify | Enabled automatically |
| Nginx | gzip on; gzip_types text/plain text/css application/json application/javascript text/xml application/xml; gzip_min_length 1000; |
| Express (Node.js) | const compression = require('compression');
app.use(compression()); |
| FastAPI / uvicorn | Use GZipMiddleware:from starlette.middleware.gzip import GZipMiddleware app.add_middleware(GZipMiddleware, minimum_size=1000) |
Check if your domain has this issue