Link to home
Start Free TrialLog in
Avatar of Neil Thompson
Neil ThompsonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

GZip turned off everywhere but still in headers - IIS Win Server 2012

hi, wonder if you gurus can assist please.

I have a server I'm connecting to (via reverse proxy from another IIS server) but having trouble as gzip is on and I cannot find out why.

I've checked the compression settings on the site, subsite and at global level within IIs

User generated image
and the following line is also in the
 <scriptResourceHandler enableCompression="false" enableCaching="true" />

Open in new window


User generated image
any ideas greatly appreciated please.

Thanks, Neil
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

I would check in the following areas:

1.  At the server scope... is this setting enabled or not.
2.  Headers can also be controlled in code.  I would check the source to see if being set there.

Also, can you post the web.config for the app?

This setting
<scriptResourceHandler enableCompression="false" enableCaching="true" />
does not control compression in the way you understand.  This is for ECMAscript/javascript

Reference link:  https://msdn.microsoft.com/en-us/library/bb513840(v=vs.100).aspx

This is how you control compression in the web.config: (as an example only)

<httpCompression directory="%SystemDrive%\websites\_compressed" minFileSizeForComp="1024">
    <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
    <staticTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/javascript" enabled="true" />
        <add mimeType="application/json" enabled="true" />
        <add mimeType="*/*" enabled="false" />
    </staticTypes>
</httpCompression>

Open in new window


Dan
Avatar of Neil Thompson

ASKER

Thanks Dan

So if I simply used the below would this force everything not to use gzip? do I need to add something about stopping the dynamic bits as well please?

<httpCompression directory="%SystemDrive%\websites\_compressed" minFileSizeForComp="1024">
    <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
    <staticTypes>
        <add mimeType="*/*" enabled="false" />
    </staticTypes>
</httpCompression>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks Dan,

The proxy server is the main web server running IIS, there are 3 outbound rules fixing errors from 3rd party systems that cannot be fixed at the source level themselves unfortunately, hence the need to have the gzip off on the proxied server, add the new headers then send on it's way with gzip in the end.

I'll have a look at your links now and advise.
Superb, many thanks this worked perfectly for me.

Regards
Neil

https://www.saotn.org/iis-outbound-rules-with-gzip-compression/