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

Jak
Jak
Member
364 Points
152 Posts

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

Views: 8247
Total Answered: 1
Total Marked As Answer: 1
Posted On: 22-Jan-2015 16:21

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Moderator
1172 Points
211 Posts
         

Gzip compression is used to increase the page performance of website or application by compressing html, css, jquery, JavaScript etc files.

Gzip compression is mainly used to improve performance of website by compressing project files for that we need to write the code like as shown below in web.config file

 

<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"/>

By setting above properties in web.config file automatically it will compress application files and it will help us to improve performance of website.

Posted On: 22-Jan-2015 16:29
 Log In to Chat