What would you say if I told you that a very simple trick can save up to 75% of your bandwidth, visibly make your website load up to four times faster and make your visitors more satisfied? The data on the web is forecasted to grow exponentially over the next few years. In addition, even today the number one complaint among web users is lack of speed. The answer to this challenge is HTTP compression.
The basic idea is to compress data being sent out from the server and have the browser decompress this data on the fly, thus reducing the amount of data sent and increasing the page display speed. The data is being compressed dynamically on the fly so you don’t need to upload any pre-compressed files.
How Much Bandwidth Will I Save?
Usually around 75% though it can be a bit more or a bit less. Let’s take a look at the following table and graph showing differences between compressed and uncompressed sites:
|Website||Size (uncompressed)||Size (compressed)||Percentage savings|
|google.com||3,873 bytes||1,412 bytes||63.5%|
|orbitz.com||44,183 bytes||9,046 bytes||79.5%|
How to Get It Working
First, you need to be sure your web hosting provider supports this feature (most of them do already). If you’re not certain, just browse through their faq or ask them via email. I’m sure they will gladly help you. The “how to get it working” varies depending on what type of webserver is being used.
Considering the Apache 2.0 webserver the process is simple. Open the .htaccess file located in your website directory and fill in this:
AddOutputFilterByType DEFLATE text/html text/plain text/xml
Once you have done that the HTTP compression should be enabled. You can check it by using Web Page Analyzer. It will show you whether the content encoding is enabled or not plus some other interesting information concerning your website’s loading speed.
When other webserver is being used (IIS etc) you’ll probably need to contact your web hosting provider in order to get information on how to enable the compression.
Sit Back And Enjoy
Now you can enjoy your site loading faster and saving tons of bandwidth while not altering the look and the functionality. If you liked this article, please digg it or leave a comment.