Tag Archives: transfer

Saving Bandwidth and Speeding Up Your Site With GZIP and Browser Caching

There are a couple of easy adjustments you can make to your web server in order to decrease page loading times, save bandwidth, and reduce load on the server. All you have to do is add a couple of code snippets to either your Apache server configuration file (httpd.conf or apache2.conf) or an .htaccess file.

Note that these require that your server have certain modules installed for this to work. You will need either mod_deflate or mod_gzip for GZIP compression and mod_expires for the browser caching trick.

Enable Browser Caching

When a web browser loads a page, it checks each item it requests (JavaScript, CSS, images, etc) against its local cache. If an item, say the stylesheet, hasn’t expired yet, then it will load the local copy instead of requesting a new one. Now if you were to instruct your server to set the expiration time for images, CSS, and JavaScript files to one month from the present, users viewing multiple pages of your site (even across multiple days) won’t tax your resources as much, as they will use the copies of your stylesheets and images that have already been downloaded.

Continue reading →