How to check that the Apache compression (gzip, deflate) is working?
Use curl from the command line to check whether your Apache configuration compresses data before sending it to clients.
Send Apache a request indicating that compressed responses are accepted, then inspect the returned headers to see how the data was sent.
Example command to check Apache compression support:
[tum@ezylinux ~]$ curl -I -H 'Accept-Encoding: gzip,deflate' http://www.ezylinux.com |grep "Content-Encoding"
Replace http://www.ezylinux.com with the URL to check. If compression is supported, the response contains:
[...]
Content-Encoding: gzip
[...]
or
[...]
Content-Encoding: deflate
[...]
Example command and output:
[tum@ezylinux ~]$ curl -I -H 'Accept-Encoding: gzip,deflate' http://www.ezylinux.com |grep "Content-Encoding"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 8202 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Content-Encoding: gzip