CDN compression not working correctly. RRS feed

  • Question

  • Hello,

    Been grappling with this issue for a while and hoping someone might hav the answer. 

    We are using the Azure CDN Akamai and we have compression enabled, everything looks correct. I went through the troubleshooting docs and the only thing I can see is that our request header doesn't have a Host header? 

    There is a :authority header that points to the correct spot on cdn. From what I can find on the troubleshooting docs that would be the correct path for the Host header if there was one.

    Any enlightenment on this issue would be much appreciated.



    Tuesday, January 9, 2018 5:18 PM

All replies

  • When you say its not working correctly, do you mean the file isn't returning compressed?

    Can you give me the URL to the file, as well as the full request headers you are using?

    Tuesday, January 9, 2018 7:33 PM
  • Yea its not returning compressed.

    Here is request general:

    1. Request URL:
    2. Request Method:
    3. Status Code:
      <label class="resource-status-image" is="dt-icon-label" style="min-width:0px;min-height:0px;box-sizing:border-box;flex:0 0 auto;"></label>
    4. Remote Address:
    5. Referrer Policy:

    Here is the request header:

    1. :authority:
    2. :method:
    3. :path:
    4. :scheme:
    5. accept:
    6. accept-encoding:
      gzip, deflate, br
    7. accept-language:
    8. alexatoolbar-alx_ns_ph:
    9. cache-control:
    10. pragma:
    11. referer:
    12. user-agent:
      Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

    Thanks for taking a look.


    Tuesday, January 9, 2018 7:58 PM
  • It appears the file is too large for CDN compression. 

    Must be Larger than 128 bytes and smaller than 1 MB.

    You may still be able to return compressed files if your Origin supports compression, and returns compressed from the Origin to the CDN. The CDN can do pass through in this case, but not perform on-the-fly compression.

    Please verify your Origin can support gzip compression, then do a Purge on the file. After that make a request with 'accept-encoding:gzip' to test compression again. 

    Tuesday, January 9, 2018 8:30 PM
  • Ok. 

    So if I store it compressed on the blob with content-encoding: gzip and content-type: application/x-javascript we should be ok?

    For some reason I thought that restriction only applied to the Verizon CDN...

    Thanks for taking a look.


    Tuesday, January 9, 2018 8:45 PM
  • The restriction is for Verizon, and the endpoint you sent above is a Verizon endpoint.
    Tuesday, January 9, 2018 9:12 PM
  • Hmm...thats weird.

    I was told we were Azure CDN Akamai. But I'll check in to that. 

    Thanks for all your help. 


    Tuesday, January 9, 2018 9:59 PM