Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It was discovered thru trial and error that Azure CDN has a current limitation that it won't pass the <strong>Accept-Encoding</strong> HTTP header unless it finds a QueryString parameter containing a compressable filename type (<em>.js, .cs</em>) or you are requesting a file by its original name (<em>jquery.js, site.css, etc.</em>). </p> <p>What this means is that if you are using an <a href="https://stackoverflow.com/questions/4044455/where-is-webresource-axd">AXD resource handler</a> (<em>WebResource.axd, etc.</em>), the HTTP compression will not be performed. The Azure CDN will only pass the <strong>Accept-Encoding</strong> if you append a QueryString parameter with a <code>.cs</code> or <code>.js</code> extension. </p> <p>We are using a custom AXD resource handler, so this was easy for us to implement. We just applied <code>&amp;group=core.js</code> and <code>&amp;group=core.css</code> for our combined minified resources and the compression worked as expected. It's unfortunate this doesn't exist in the current <a href="http://msdn.microsoft.com/en-us/library/windowsazure/ff919705.aspx" rel="nofollow noreferrer">Azure CDN documentation</a>.</p> <p>In short, we had to transform our URIs from this:</p> <blockquote> <p><a href="https://xxxx.vo.msecnd.net/resourceManager.axd?token=HL80vX5hf3lIAAA" rel="nofollow noreferrer">https://xxxx.vo.msecnd.net/resourceManager.axd?token=HL80vX5hf3lIAAA</a></p> </blockquote> <p>to this:</p> <blockquote> <p><a href="https://xxxx.vo.msecnd.net/resourceManager.axd?token=HL80vX5hf3lIAAA&amp;group=core.js" rel="nofollow noreferrer">https://xxxx.vo.msecnd.net/resourceManager.axd?token=HL80vX5hf3lIAAA&amp;group=core.js</a></p> </blockquote> <p>Once the Azure CDN sees the <code>.js</code> in the querystring, it will return the compressed version of the resource.</p> <p>Hope this helps someone else using web resources (AXDs) served up via the Azure CDN.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload