Practices
Send your pages compressed so they arrive faster
Your server sends the page exactly as written, instead of compressing it in transit first.
Why it matters
Text compresses extremely well: a typical page shrinks to roughly a third of its size. That is the same content arriving in a fraction of the time, for free, with no change to how the page looks. On a phone on a weak signal this is the difference between a page appearing and a visitor leaving.
How you would notice it
- Pages feel slow on mobile data but fine on office wifi.
- Your host reports high bandwidth use for mostly text content.
- Large pages arrive no faster after you remove images.
What to do
Stage 1
- Check whether compression is already on. Use a header checking tool against your own address.
Look for a response header named content-encoding. If it says br or gzip, you are already done.
https://www.whatsmydns.net/http-headers/example.comStage 2
- If you are on shared hosting with a control panel, look for a compression setting. On cPanel it is usually under Optimize Website; on Plesk it is under Apache and nginx settings.
- If you manage your own server, enable it in the web server config and restart.
Gzip works everywhere. Brotli is smaller but only understood by modern browsers, so enable both.
# nginx
http {
gzip on;
gzip_types text/html text/css application/javascript application/json;
gzip_min_length 1024;
brotli on;
brotli_types text/html text/css application/javascript application/json;
}Stage 3
- If your site is behind a CDN or platform host, compression is usually automatic. Check their setting before changing server config.
How to check it worked
Confirm it worked
Run the header check again and confirm content-encoding now reports br or gzip for your page. Re-run the Siege Test and confirm the text compression recommendation is gone.