What it is
When a server sends a page to a visitor's browser, it can optionally compress that data first β packing it down into a smaller size, the same basic idea as zipping a file before emailing it β and the browser then automatically unpacks it the instant it arrives. Gzip and brotli are the two most common compression methods used for this on the web; brotli is newer and generally compresses slightly better, but both accomplish the same goal.
This happens entirely behind the scenes: a visitor never sees a "compressed" version of anything, they just experience it as a page that arrived faster than it would have otherwise.
Why it matters
Text-based content β HTML, CSS, and JavaScript code β typically compresses down to a fraction of its original size, often 60-80% smaller, because of how repetitive that kind of code tends to be. Sending a smaller file over the network takes less time, which matters most on slower connections like mobile data, where every extra second of load time increases the chance a visitor gives up and leaves before the page even finishes appearing.
Unlike many performance improvements, enabling compression is typically a single setting, not a redesign β it's one of the highest-value, lowest-effort fixes available for site speed.
How to fix it
- Check whether compression is already enabled by looking at your browser's developer tools (Network tab) and checking a page request's response headers for
Content-Encoding: gziporContent-Encoding: br. - If you're on a static host like Netlify, Vercel, or Cloudflare Pages, compression is typically already on by default β no action needed.
- On a traditional web host with cPanel or similar, look for a "gzip compression" toggle in performance or optimization settings.
- If you manage your own server, ask your host or developer to enable gzip or brotli compression at the server or CDN level β this is a standard, well-documented configuration change for any common server software.
- Re-check the response headers afterward to confirm compression is now active.