I\'m trying to enable GZIP compression on IIS 7.5.
I think all the settings are okay.
In ApplicationHost.config I have this httpCompression section:
The below configurations worked for me. Just replace the httpCompression section in applicationHost.config with the given below and restart IIS. That's it!!!
After configuring this, I got the below Headers in response which indicates that data is compressed using gzip compression
Cache-Control → no-cache
Content-Encoding → gzip
Content-Length → 4202
Content-Type → application/json; charset=utf-8
Date → Wed, 22 Jul 2015 07:40:17 GMT
Expires → -1
Pragma → no-cache
Vary → Accept-Encoding
X-Powered-By → ASP.NET
The above configuration is for the entire IIS. If you want to configure this for a single Website then replace
with
in applicationHost.config and instead of replacing the httpCompression section in applicationHost.config, add it under system.webServer tag in web.config of your Website
Also, make sure that you have specified correct MIME type for your data. In my case it was in JSON, so I used below configurations