Enable Gzip Compression in Asp.net on Web.Config to Improve Website Performance - ASP TANMOY

Latest

Monday 26 June 2017

Enable Gzip Compression in Asp.net on Web.Config to Improve Website Performance

Here I will explain how to enable gzip compression in asp.net and setup on web.config file or add gzip compression in asp.net website on web.config file. Gzip compression is used to increase the page performance of website or application by compressing html, css, jquery, JavaScript etc files.

CODE:

<system.webServer>
<httpCompression directory="%SystemDrive%\inetpub\
temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
<dynamicTypes>
<add mimeType="text/*" enabled="true"/>
<add mimeType="message/*" enabled="true"/>
<add mimeType="application/javascript" enabled="true"/>
<add mimeType="*/*" enabled="false"/>
</dynamicTypes>
<staticTypes>
<add mimeType="text/*" enabled="true"/>
<add mimeType="message/*" enabled="true"/>
<add mimeType="application/javascript" enabled="true"/>
<add mimeType="*/*" enabled="false"/>
</staticTypes>
</httpCompression>
<urlCompression doStaticCompression="true" doDynamicCompression="true"/>
</system.webServer>

No comments:

Post a Comment