ASP Dot Net compression for static contentThis is a featured page

In many cases HTTP GZip compression means the difference between waiting 10 seconds for a web page versus 2 seconds. These days as users expect near instant loading of web pages, if the pages on your website take a while to load this could very well mean the difference between a visit and a bounce in your stats. If your running a PHP web application such as wordpress or say joomla for instance chances are that your hosting company is already providing this functionality for you. As a matter of fact mod deflate, which is the http compressor for apache has become almost common place in web server installations. However those of us running ASP Dot Net web applications like say for example Rainbow Portal or perhaps a custom web application, tend to be less fortunate. Most windows hosting providers do not provide GZip compression functionality by default. In case you're running your own web server then then you could read all the technical documents and attempt to enable IIS output compression as I once did. However much to my disappointment I found that the out of the box compression levels provided by IIS6 was rather average as compared to standard Apache mod deflate. In this case what other options do we have? Fortunately for us the Dot Net framework provides the HTTP handler and HTTP module constructs. Using these it turns out that implementing high GZIP compression with barely noticeable CPU overhead is an almost trivial task. All we need is a basic http handler implementation that checks for a AcceptEncoding = "gzip" or AcceptEncoding = ”deflate” request header. If this header is present then all it needs to do is to attach a GZIP compressed IO stream as a filter for the active response. At this point however writing an efficient, high compression GZIP IO stream ends looking like a massive task. Fortunately for us the ICSharpCode project provides a high performance, high compression GZIP IO stream in their SharpZipLib dll. The SharpZipLib project is an opensource GPL library which as an exception can also be feely used in closed source commercial applications. You can find a free implementation along with complete instructions, source code and compiled executables at the following URL.
asp dot net compression
dot net compression

The link below will take you to a free implementation with source code, installation instructions, and compiled executables. asp dot net compression. click here for more asp dot net development resources


No user avatar
aspdotnetcompr
Latest page update: made by aspdotnetcompr , Dec 8 2009, 7:33 AM EST (about this update About This Update aspdotnetcompr Edited by aspdotnetcompr

413 words added

view changes

- complete history)
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)