↑ ↓ select, Enter open, Esc close

Measure gzip and Brotli savings for a URL

Adjust the values, the command updates live
user@server
for e in identity gzip br; do curl -s -o /dev/null -H "Accept-Encoding: $e" -w "$e: %{size_download} Bytes\n" https://example.com/; done

Requests the resource three times and shows the bytes actually transferred. curl does not decompress here, so the numbers reflect what goes over the wire. If all three values are the same, the server does not compress this resource.

Note: Works just as well for individual CSS and JS files. The entry on checking gzip and Brotli in the nginx category checks only the Content-Encoding header.

Also searched as

  • how much does gzip save
  • compare brotli vs gzip size
  • compressed size of a page
  • measure transfer size curl

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.