Enabling HTTP Compression to increase DNN Performance

DNN is a content management system which allows you to create dynamic database driven websites. Everything is pulled from a database so there is a little more overhead than a static website.

 

If you find your DNN site running slower and slower as you create more content especially with a lot of media, you may want to consider enabling HTTP compression. To do this you will need to download the latest version of Ben Lowery’s compression module from blowery.org. Here is a link:

 

http://www.blowery.org/code/HttpCompressionModule.html

 

Once you have that downloaded upload the .dll files into the bin folder of your website, and add the following to your web config:

 

<configSections> Section…

 

<sectionGroup name="blowery.web">
         <section name="httpCompress"  type="blowery.Web.HttpCompress.SectionHandler, blowery.Web.HttpCompress"/>
</sectionGroup>

 

<configuration> Section…

 

<blowery.web>
   
    <httpCompress preferredAlgorithm="deflate" compressionLevel="high">
        <excludedMimeTypes>
            <add type="image/jpeg"/>
            <add type="image/gif"/> 
        </excludedMimeTypes>
        <excludedPaths>
            <add path="NoCompress.aspx"/> 
        </excludedPaths> 
    </httpCompress>
</blowery.web>

 

<httpModules> Section…

 

<add name="CompressionModule" type="blowery.Web.HttpCompress.HttpModule, blowery.web.HttpCompress"/>

 

Save your web.config file and your all set. This should compress your pages so it takes less time to download and render. Keep in mind that this is not a replacement for faulty design. If your site is still slow you will want to review the content on your site and make improvements, such as reducing the size of your pictures, and moving to CSS instead of using tables for formatting.

Add Feedback