Thursday, October 23, 2008

HTTP Compression?

Almost every reader of this blog must be familiar with the term ‘Compression’, but the term ‘HTTP Compression’, might sound a bit strange for quite a few of you.

Today, with the ever increasing tendency of companies providing more and more services over the web; the page load time and the overall responsiveness of the web application, are becoming more and more critical in the adaptability of that web application.

All the web engineers out there must have wondered that despite of their strive to improve the response time of their web application, using techniques like data caching, output caching, minimizing number of web requests, moving JavaScript and CSS in external files, placing JavaScript at bottom and CSS at top and what not; but still there is some thing missing and that’s hindering the overall load time of their web application and affecting the end user’s experience.

Why your web application’s load time is not comparable to the load time of Yahoo and MSN home pages, even though their home pages are showing a lot of dynamic contents? It’s true that their solution is exploiting the full capabilities of hardware too, along with the software but still, there is some thing which even you can configure at the software level to improve the overall page load time of your application in order to improve not only the performance of your web application but to have an improved end user’s experience as well. That software level tweak is called the ‘HTTP Compression’; something similar to zip or rar, but for HTTP responses.

‘HTTP Compression’ is a web standard in which GZip (GNU Zip) or Deflate encoding is applied to the overall payload of the HTTP response by the web server, and at the client end i.e. web browser, the HTTP response is decompressed and rendered to the end user. This result in a significant decrease in the overall network traffic and improves the over all load time of your web application to a very significant extent, with an additional advantage of saving the costs associated with the network bandwidth consumption.

‘HTTP Compression’ is supported by all the modern web browsers and web servers. You can not only compress the static contents (css, js …) but the dynamic contents (.aspx, .asp, .php …) as well. Here is a walkthrough on How to enable HTTP Compression on IIS 6.0 for ASP.NET based web applications. You can definitely Google for enabling this very feature on other web servers as well.

Here are links to the analysis reports, showing the percentage decrease in payload and the improvements in the overall load time for MSN, Yahoo, Facebook and trg tech @ blogspot. Do have a look at these in order to actually appreciate the overall performance gain achieved because of ‘HTTP Compression’ by these web giants.

No comments: