目前在国外网站bi4ce上面炒的最热的主题就是利用HttpCompression对dnn进行压缩提速了,测试结果是已经达达到约 90% 的压缩率。

请用于3.*版本中,4.*版本中有bug

安装使用方法:

1、下载 来自 blowery.org的HTTP Compression Module;

2、解压后把blowery.Web.HttpCompress.dll上传到你的bin目录;

3、添加以下代码在你的web.config

在 <configSections> 增加-

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

</sectionGroup>

<configuration> 增加-

<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> 增加 -

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

保存并运行你的网站,第一次打开会慢点。本地测试结果确有很明显的提升

posted on 2007-11-26 12:25  痞子再  阅读(407)  评论(0编辑  收藏  举报