Skip to content

Instantly share code, notes, and snippets.

@timendum
Created July 27, 2011 10:09
Show Gist options
  • Save timendum/1109067 to your computer and use it in GitHub Desktop.
Save timendum/1109067 to your computer and use it in GitHub Desktop.
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
@Feriman22
Copy link

Feriman22 commented Jun 4, 2020

This version is working for me:

curl -H "Accept-Encoding: gzip" -i https://blogginger.com 2>/dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment