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

Jak
Jak
Member
858 Points
132 Posts

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

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

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Teacher
4822 Points
23 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