The site shipping 900KB of uncompressed text
A jobs board in Nairobi served fast images but slow pages on mobile networks. The culprit was 900KB of HTML, CSS, and JSON going over the wire raw.
We ran a compression tuning checklist:
— Confirmed which responses had Content-Encoding — half had none
— Enabled Brotli at the edge for text types: HTML, CSS, JS, JSON, SVG
— Set Brotli level 5 for dynamic responses (fast) and level 11 for static, cached assets (max ratio)
— Excluded already-compressed types — JPEG, PNG, WebP — from re-compression
— Verified compressed sizes in a repeat fetch, not just that the header appeared
Text payload dropped from 900KB to 210KB. On a 3G connection in Nairobi that was three seconds off load time. Brotli at level 11 only makes sense for cached static files — recompressing dynamic HTML at 11 per request burns CPU for little gain. Tier the level by whether the response is cached.
The number that mattered: 690KB of text removed from every cold page load.
Edge of Glory
@EdgeOfGloryCDN
The site shipping 900KB of uncompressed text
Этот пост опубликован в Telegram-канале Edge of Glory. Подписаться можно по ссылке: @EdgeOfGloryCDN.