1

My website is hosted on an Azure WebRole and the content is fetched using Azure CDN. The main HTTP request itself is compressed, but the static content (css & js are the main issue here) isn't. The request is sent with 'Accept-Encoding: gzip,deflate,sdch' header, but the response is missing the 'Content-Encoding: gzip' and 'Vary: Accept-Encoding' headers. It's important to note that this happens when fetching the content both from and the CDN and directly from the WebRole.

These are the relevant web.config sections:

<urlCompression doDynamicCompression="false" doStaticCompression="true" />
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" noCompressionForHttp10="false" noCompressionForProxies="false">
  <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
  <dynamicTypes>
    <add mimeType="*/*" enabled="false" />
  </dynamicTypes>
  <staticTypes>
    <add mimeType="text/*" enabled="true" />
    <add mimeType="message/*" enabled="true" />
    <add mimeType="application/javascript" enabled="true" />
    <add mimeType="application/x-javascript" enabled="true" />
    <add mimeType="image/svg+xml" enabled="true" />
    <add mimeType="*/*" enabled="false" />
  </staticTypes>
</httpCompression>

As you can see in the config, I've enabled compression for proxies and for HTTP 1.0, but it doesn't seem to be the problem.

Anyone has an idea what's wrong here?

  • possible duplicate of [Azure CDN - Enabling HTTP Compression - Hosted Web Role](http://stackoverflow.com/questions/10420004/azure-cdn-enabling-http-compression-hosted-web-role) – Archlight Jul 24 '14 at 14:07
  • Did you ever resolve this? Did you try turning on compression at the CDN level? https://azure.microsoft.com/en-us/documentation/articles/cdn-improve-performance/ – Cam Soper Dec 02 '15 at 18:08

0 Answers0