Fill the Server: 80% off your first 4 monthly invoices, monthly billing. Ends Nov 30, 2026. 25 spots in this batch.FILL25
Fill the Server, annual: about 29.63% off your first annual invoice. Ends Nov 30, 2026.FILL25Y
Fill the Server, 2 year term: about 15.69% off your first biennial invoice. Ends Nov 30, 2026.FILL25B
Fill the Server, 3 year term: about 11.11% off your first triennial invoice. Ends Nov 30, 2026.FILL25T
80% off your first 3 months, monthly billing. Ends Dec 25, 2027.3MONTHS80
50% off your first annual Shared term. Ends Dec 31, 2027.50SHARED
Shared Starter, 3 year term: C$105.84 total.MOOSE294
20% off your first 3 monthly VPS invoices. Ends Dec 31, 2027.20VPS3
25% off your first annual base VPS term.25VPS

← All guides

Web hosting

Website compression setup: gzip, Brotli and what should actually be compressed

Published August 2026 · 2 min read · Updated 2026-09-05

HTTP compression reduces transfer size for compressible responses such as HTML, CSS, JavaScript, JSON, XML, and text. It should be negotiated with Accept-Encoding, applied to appropriate types and sizes, and measured against CPU cost and limited to response types that actually benefit from compression.

Inspect current Content-Encoding

Request representative assets with and without gzip/br support and compare Content-Encoding, Vary: Accept-Encoding, Content-Type, original bytes, and transferred bytes. A CDN may compress even when the origin does not.

Do not infer compression from a control-panel checkbox; test the public response.

Compress the formats that benefit

Text, code, SVG, JSON, and many API responses usually shrink well. JPEG, PNG, WebP, AVIF, MP4, ZIP and other compressed formats often gain little and waste CPU if recompressed.

Set minimum size thresholds so tiny responses do not pay unnecessary overhead.

Keep caching variants correct

Shared caches must distinguish compressed and uncompressed variants where content negotiation happens. Vary: Accept-Encoding and CDN configuration should preserve the right representation for each client.

Check ETag behavior if the server emits different bytes for encodings.

Measure performance after enabling

Compare transferred bytes, CPU use, response latency, and cache hit behavior. Brotli at extreme quality can cost more origin CPU than it saves for dynamically compressed responses; precompression can be a better fit for static assets.

  • Verify public Content-Encoding.
  • Target compressible MIME types.
  • Preserve cache variants.
  • Measure bytes and CPU together.

Next step

Enable content compression for suitable text assets, avoid recompressing media formats that gain little, and verify headers and transfer size from the browser.

Explore DotMoose web hosting

Keep reading

Related guides.

HTTP 500, 502 and 503 errors explained for website owners

Learn what HTTP 500, 502 and 503 errors usually indicate, which layer to investigate, what evidence to collect, and when restarting a service is not the real fix.

Read the guide

Virtualmin vs cPanel: Which Control Panel Should You Choose?

Virtualmin vs cPanel compared on licensing cost, account and site management, email, DNS, backups and migration, so you can pick the control panel that fits how you host.

Read the guide

How to move web hosting without downtime

Move a website and database with destination testing, final synchronization, controlled DNS cutover, and rollback while preserving separate mail routing.

Read the guide

More web hosting guides

We will handle the move. You check it first.

Your current site stays online until your new one is ready. You approve the copy first, and if anything is not right we switch you back right away. The price you pick is the price you renew at.

Start my free moveSee plans and prices
See pricesFree move