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
- Enable Brotli where available, or gzip as a fallback.
- Apply compression to HTML, CSS, JS, JSON, XML, and similar text formats.
- 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.