Skip to content

Instantly share code, notes, and snippets.

@seralexeev
seralexeev / check-gzip.sh
Created December 28, 2016 13:12 — forked from timendum/check-gzip.sh
Check if gzip is enabled [ http bash curl ]
curl -I -H "Accept-Encoding: gzip,deflate" "$URL" --silent | grep -i "Content-Encoding:"
# OR
curl -H "Accept-Encoding: gzip,deflate" "$URL" --silent --write-out "%{size_download}" --output /dev/null
curl "$URL" --silent --write-out "%{size_download}" --output /dev/null
# 2nd must be greater the 1st