There’s nothing like performance tuning your website and watching benchmarks better themselves. Sometimes it can be tricky but fortunately this is one of the easier fixes. YSlow and Chrome Dev tools recommend gzip compression and you are looking at around a 70% reduction in file size for your static and dynamic resources. Great! So how do we do it?
First of all this blog post applies to IIS7 and above. IIS7 has Dynamic Content Compression un-installed so install it by heading to Windows Features.
In your solution, add the following config to your web.config:
<urlCompression doDynamicCompression="true" />
You can check your dynamic content is now being compressed with gzip by looking at the response header in fiddler, firebug or chrome developer tool: