I have a webapp on a NGinx server. I set gzip on in the conf file and now I\'m trying to see if it works. YSlow says it\'s not, but 5 out of 6 websites that do
I wrote this script based on the zoul's answer:
#!/bin/bash
URL=$1
PLAIN="$(curl $URL --silent --write-out "%{size_download}\n" --output /dev/null)"
GZIPPED="$(curl $URL --silent -H "Accept-Encoding: gzip,deflate" --write-out "%{size_download}\n" --output /dev/null)"
if test $PLAIN -gt $GZIPPED
then echo "supported"
else echo "unsupported"
fi
example:
$ ./script.sh https://example.com/