I am using asp.net webform 4.5.1. I want to compress the pages with Gzip method. Before in asp.net 2 after adding Gzip's Dll I added this code to Web.config:
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="DCWeb">
<section name="HttpCompress" type="DC.Web.HttpCompress.Configuration, DC.Web.HttpCompress"/>
</sectionGroup>
</configSections>
<DCWeb>
<HttpCompress compressionType="GZip">
<IncludedMimeTypes>
<add mime="text/html"/>
</IncludedMimeTypes>
<ExcludedMimeTypes>
<add mime="image/jpeg"/>
<add mime="text/javascript"/>
</ExcludedMimeTypes>
<ExcludedPaths>
<!--<add path="~/Default.aspx" />-->
</ExcludedPaths>
</HttpCompress>
</DCWeb>
<appSettings>
<add key="Anthem.ResponseType" value="application/x-anthem"/>
</appSettings>
<system.web>
<httpModules>
<add name="HttpCompressModule" type="DC.Web.HttpCompress.HttpModule,DC.Web.HttpCompress"/>
</httpModules>
<httpHandlers>
<add verb="*" path="js.axd,css.axd" type="DC.Web.HttpCompress.CompressionHandler,DC.Web.HttpCompress"/>
</httpHandlers>
</system.web>
</configuration>
But know I dont know How can I do this in asp.net 4.5.1 . Please Help me. Also I want to know that, is there any other better method to compress the webpage and speed up the page load?