← Hosting reviews

Website performance

Transfer size · Gzip and Brotli

Gzip and Brotli website compression

Gzip and Brotli make text files smaller before your browser downloads them. Try the same sample in three formats. Then learn how to check a real website.

File size lab

Switch formats to see the response body size for one HTML file.

Original sample size
23,976 bytes
5,749 bytes

76% smaller

Sample file · This example does not test hosting companies

What happens when a page loads

The browser asks

The request’s Accept-Encoding header says which compression formats the browser can read.

The server or CDN responds

The response’s Content-Encoding header says which format was actually used, such as gzip or br for Brotli.

The file is decoded

The browser reads the original file from the smaller download. Sending less data can help on a slow connection.

How to compare hosting results

  1. Deploy identical HTML, CSS, and JavaScript files on each named plan.
  2. Request the same file without compression and with Gzip and Brotli accepted. Record the encoding actually sent and the bytes in each response body.
  3. Record the test date, request location, cache settings, and whether a CDN served the response.
HTTP content negotiation reference ↗

How to read the results

This example compares one HTML file. The saving changes with the file and settings. Check real page-loading times separately. Pictures and videos need their own size checks.

Check the delivery path

A CDN may compress the file too. Check whether a result comes from the host or the CDN before judging the hosting plan.

What do Gzip and Brotli do?

Make text files smaller

Gzip and Brotli shrink text files for the trip to your browser. These include page text, styles and scripts. The browser reads the original data after it arrives. Pictures and videos may already be compressed and need different tools.

Check a real page

Your browser’s developer tools show how a file was sent. Look for Content-Encoding, a label that names the compression used. It may show gzip or br, which means Brotli. Check the download size too.

Understand caching too

Compression makes a file smaller to send. Caching keeps a copy so it can be used again. They can work together. This is why a repeat visit can behave differently from a first visit.

Technical references: MDN HTTP compression guide, Content-Encoding reference and HTTP caching guide.

What should you ask your host?

Ask whether the host, your website software or a CDN controls compression. A CDN can deliver files from places nearer to visitors. Find out which settings you can change and when you need support.

To compare results, use the same file and similar test conditions. Record the download size and compression used. A smaller file alone does not tell you how fast the whole page will load.

Large pictures, extra scripts and website code can also affect loading time. Compare backups and support too. Read our research method to understand the limits of outside test results.

Compare hosting plans and features or explore individual provider reviews.

Provider screenshot