Determine if a server supports Gzip compression
Posted by Kelvin on 06 Jun 2011 at 01:13 pm | Tagged as: Ubuntu
echo "Size WITHOUT accepting gzip" curl http://www.supermind.org --silent --write-out "size_download=%{size_download}\n" --output /dev/null echo "Size WITH accepting gzip" curl http://www.supermind.org --silent -H "Accept-Encoding: gzip,deflate" --write-out "size_download=%{size_download}\n" --output /dev/null
You can of course substitute the URL with a different one.
On my site, this is what I get:
$curl http://www.supermind.org --silent --write-out "size_download=%{size_download}\n" --output /dev/null $size_download=10560 $curl http://www.supermind.org --silent -H "Accept-Encoding: gzip,deflate" --write-out "size_download=%{size_download}\n" --output /dev/null $size_download=4345
- Introducing Bash-whacking
- Recursively delete .svn folders
- Move up multiple directories in bash
- Download youtube videos as mp3
- Useful ffmpeg commands
- Recursively copy only files with certain extension with rsync
- Recursive directory listing sorted by file size
- Download google video and youtube from command-line
- Reset wireless in Ubuntu 10.04 Lucid
- Delete files older than x days
- MD5 a directory recursively
- Convert fixed-width file to CSV
- Recursively find the n latest modified files in a directory
- Using sed to delete lines from a file
- Determine if a server supports Gzip compression
- Delete directories older than x days
- Mount a .dmg file in Ubuntu
- Batch convert svg to png in Ubuntu
- Split wav/flac/ape files with cue