Perform HTTP compression test using curl utility.

To perform HTTP compression test on the https://example.org domain execute command:

$ curl -s -I --compressed  https://example.org | grep Content-Encoding
Content-Encoding: gzip

Empty result means that it doesn’t support compression.

Alternatively, you can be more precise and define custom header.

$ curl -s -I -H 'Accept-Encoding: gzip,deflate' https://example.org | grep Content-Encoding >/dev/null && echo "It supports compression" || echo "It does not support compression"
It supports compression