I am using Win 2012 and IIS 8.5 with Orchard CMS 1.10.1. The DB is SQL CE. I am trying to enable http compression and keep intermittently getting a strange response after enabling dynamic content compression through IIS.
I added this line in the web.config of the orchard application to enable http compression:
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true"/>
Here is what the page displays sometimes:
When I am not getting this strange browser response (which happens in all browsers), the page loads fine and and even tests positive for gzip encryption on this site: https://www.giftofspeed.com/gzip-test/
Set
dynamicCompressionBeforeCache="false"
Reason why you get garbled responses has to do with Orchard.OutputCache module caching response that is already gzipped and then when it serves that cache IIS will gzip that response once again and browsers don't do double decompression.
That flag is meant for IIS output caching which you are not using as Orchard has superior implementation. So even with that flag turned off it will still do compression before output caching.