performance – Doubts about gzip compression on IIS servers


I have a question, I have hosting at kinghost and before calling support I would like to know if what is happening is really a problem.

what happens is that the static files (mostly in question the css and js ) are not always being delivered zipped.

The css and js content is delivered with gzip , but not always. I noticed this when using google's pagespeed and sometimes it reports that the content is not being compressed. So I used chrome's DevTools and updated the same page several times with the same css and js and noticed that the server really doesn't always deliver these compressed files.

Why does it happen? is this normal or a server configuration failure?

I thank the attention.

ps.: if relevant, the IIS OS version is 8.


Apparently, IIS doesn't compress on every request. Enter the configuration below in web.config

        <serverRuntime frequentHitThreshold="1" enabled="true" />
              <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
              <remove fileExtension=".svg" />
              <mimeMap fileExtension=".svg" mimeType="text/xml" />
        <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
            <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
                <add mimeType="*/*" enabled="true" />
                <add mimeType="image/svg+xml" enabled="true" />
                <add mimeType="text/xml" enabled="true" />
                <add mimeType="*/*" enabled="true" />
        <urlCompression doStaticCompression="true" doDynamicCompression="true"/>


Scroll to Top