How To Enable GZIP Compression

Page load times are important. The faster your site loads, the better. Google has been making it clear since 2010 that page speed matters when it comes to search rankings. Page load times also affect user experience, with slow sites having the potential to frustrate visitors. The common consensus seems to be that slower sites will have a higher bounce rate, but a recent analysis of nearly 2000 Google Analytics properties has shown that there is no correlation between page speed and bounce rate.

GZIP Compression is an effective tool for reducing the size of the HTTP server response when serving text-based files such as CSS, HTML and JavaScript. It can reduce responses by up to 70% (65% on this site).

For best results, you should first apply content-specific minifiers to CSS, HTML and JS files and then apply GZIP compression to the minified cotent.

On Apache servers (which is most servers) enabling GZIP is simply a matter of adding a few lines to your .htaccess file.

# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP