Skip to content

Instantly share code, notes, and snippets.

@1franck
Created August 21, 2017 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1franck/0aa4797e33287084994d90def18fb400 to your computer and use it in GitHub Desktop.
Save 1franck/0aa4797e33287084994d90def18fb400 to your computer and use it in GitHub Desktop.
Checking if apache gzip/deflate module is working
# Call the 2 curl commands with your url and compare output results.
# If gzip/deflate is working, the 2 results should be different (second smaller).
# Without encoding header
curl http://example.com --silent --write-out "%{size_download}\n" -L --output /dev/null
# With gzip,deflate encoding header
curl http://example.com --silent -H "Accept-Encoding: gzip,deflate" --write-out "%{size_download}\n" --output /dev/null -L
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment