Does anybody know how to enable gzip compression in MVC 3? I\'m using IIS7.
Google Chrome Audit\'s result:
- Enable gzip compression (4)
You can configure compression through your web.config
file as follows:
You can find documentation of this configuration element at iis.net/ConfigReference. This is the equivalent of:
Note: (As pointed out in the comments) You need to ensure that Http Dynamic Compression is installed otherwise setting doDynamicCompression="true"
will not have any effect. The quickest way to do this is:
optionalfeatures
(this is the quickest way to get to the "Turn Windows Features on or off" window)