Doubts about gzip compression on IIS servers

3

I'm having a question, I'm hosting kinghost and before activating support I'd like to know if what's going on is really a problem.

What happens is that the static files (mainly the css and js ) are not always being delivered.

Content css and js is delivered with gzip , but not always. I noticed this when using google pagespeed and sometimes it says content is not being compressed. So I used the DevTools chrome and I updated the same page several times with the same css and js and noticed actually the server does not always deliver these compressed files.

Why does this happen? Is this normal or a server configuration failure?

Thanks in advance for your attention.

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

    
asked by anonymous 15.12.2015 / 11:45

1 answer

0

IIS does not seem to compose every request. Enter the configuration below in web.config

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

Source: link

    
15.12.2015 / 14:11