Why is IIS7.5 only performing static and dynamic compression when the response code is 200?
How do I make it compress all responses where the request had an appropriate Accept-Encoding
header?
Thanks
IIS Dynamic Compression configuration: Dynamic compression is a feature that allows the IIS web-server to compress responses coming from such handlers as the ASP.net Managed Handler, ISAPI Extensions or CGI handlers that dynamically generate responses for requests they handle.
On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Performance, and then select Static Content Compression and/or Dynamic Content Compression. Click Next.
Select the Internet Information Services (IIS) Manager under Roles > Web Server (IIS). In the IIS Manager, select the desired Site and open the Compression option (Features View). In the Compression window, mark the check box corresponding to the Enable dynamic content compression option.
I'm going to answer the 2nd part of your question, How do I make it compress all responses where the request had an appropriate Accept-Encoding header?
You do it with HTTPModules.
Here is one way using Ionic.Zlib. The module prefers to send RAW DEFLATE content because it is ALWAYS faster and ALWAYS smaller than than GZIP (why?).
A more complete solution is now hosted on github https://github.com/davidmurdoch/DEFLATE-Compression-for-IIS .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With