With Apache, the Deflate and gzip compression methods offer considerable savings. A typical 26 KB HTML file is reduced to 6 KB after being compressed with gzip.
Here is an example of an Apache configuration using the Deflate method:
<IfModule mod_deflate.c> SetOutputFilter DEFLATE # Don’t compress SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary </IfModule>