Compression reduces response times by reducing the size of the HTTP response. Gzip is the most popular and effective compression method currently available and generally reduces the response size by about 70%.
In 2009, 90% of internet traffic travelled through browsers that supported. Gzip. Today:
All modern browsers support and automatically negotiate GZIP compression for all HTTP requests: our job is to ensure that the server is properly configured to serve the compressed resource when requested by the client.
On an Apache-based server, you can do that through the `.htaccess` file:
That’s essentially a list of MIME types that gzipping will then apply to. Feel free alter the list to all text based assets you serve.
The HTML5 Boilerplate project offers server configs for all the popular servers. This is it’s version for .htaccess