Software Development Kit
HTTPCompressionModule Class
MicroMighty.SDK.Web.HttpModules Namespace
This HTTP module is running automatically when it is added to a web project as described below,
A reference to the SDK DLLs is required, see how to add a reference to the MicroMighty SDK DLLs,
To further analyze the HTTP response you can use of tools such as Fiddler and IEHttpAnalyzer
Web.Config should include the following variables in order for the HTTP Compression Module to run,
If no variables added then the module will not run and HTTPCompressionActive will be set to "false".
STEP 1 : Add the following entries in the "<appSettings>" section of "<configuration>"
<!-- HTTPCompressionModule Variables -->
<add key="HTTPCompressionActive" value="true
" />
<add key="HTTPCompressionCompressPostBacks" value="false" />
<add key="HTTPCompressionCommaSeparatedAllowedMIMETypes"
="text/html, text/css, application/x-javascript, text/javascript, text/plain, text/xml
" />
<add key="HTTPCompressionCommaSeparatedAllowedResponseStatusCodes" value="200, 304" />
<add key="HTTPCompressionCommaSeparatedExcludedPathAndFileNames"
=".axd, NoCompression.aspx
" />
<add key="HTTPCompressionInternetExplorerMinimumAllowedVersion" value="6.0" />
<add key="HTTPCompressionTestModeOnly" value="false" />
STEP 2 : Add the following entries in the "<system.webServer>" section of "<configuration>"
<!-- Disable other HTTP compressions to avoid compression conflicts on IIS 7 and above -->
<urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />
STEP 3 : Add the following entries in the "<httpModules>" section of "<system.web>"
<!-- Register HTTP modules for IIS 6.0 and IIS 7.0 running in Classic mode -->
<add name="HTTPCompressionModule"
" />
STEP 4 : Add the following entries in the "<modules>" section of "<system.webServer>"
<!-- Register HTTP modules for IIS 7.0 running in Integrated mode -->
<add name="HTTPCompressionModule"
" />
The default settings above are suggested in order to make sure that your compression module will work smoothly with other web content such as AJAX requests that may already contain compressed data.
This HTTP Compression Module allow turning on and off some compression features, however,
if you choose to modify the defaults then please test it carefully (especially AJAX enabled pages).
Depends on your IIS settings - you may need to enforce HTTP modules on HTML and maybe other files,
By default ASPX files are processed through the ASP.NET pipeline, however, you may need to configure IIS to route HTML files (and maybe other files) through the ASP.NET pipeline or move to IIS Integrated Mode.
  • HTTPCompressionCommaSeparatedAllowedResponseStatusCodes is used in order to make sure that the HTTP module is not intercepting every response but just the ones who can be compressed (see a list of status codes at
  • HTTPCompressionCommaSeparatedExcludedPathAndFileNames is used in order to exclude specific pages from being compressed (for example, the web page NoCompression.aspx will not be compressed), by default any page with the extention of ".axd" is excluded from compression since these pages are often used to pass data between AJAX controls and may fail to compress.
  • HTTPCompressionInternetExplorerMinimumAllowedVersion is used to decide what will be the minimum version of Internet Explorer in order for the compression to take place (in some scenarios older versions of Internet Explorer are reported to have problems with compression)
  • HTTPCompressionTestModeOnly is used for testing only in order to print the compressed URL without compressing it, so a developer can get some indication on what page is being processed.
    To further analyze the HTTP response you can use of tools such as Fiddler and IEHttpAnalyzer
You can use this SDK for personal use only, any commercial use or use for other
type of organization including non profit on a production server is not allowed.

You may not publish, sell, re-distribute, rent, lease or re-license any content
contained in this source code and/or DLLs and/or other components of the SDK
without an explicit written permission agreement signed by MicroMighty, Inc.

MicroMighty, Inc. reserves the right to permanently cancel without any warnings
neither refund a license that is suspected of being used illegitimately or that
violates the EULA (