Using brotli on Azure CDN

Balazs Orban 11 Reputation points
2020-06-15T12:50:52.887+00:00

Hi is it possible to prefer brotli over gzip on Azure CDN if the browser supports it?

Request header says:
accept-encoding: gzip, deflate, br

but the response header:
content-encoding: gzip

(I am on Chrome Dev on Ubuntu)
According to the docs, https://video2.skills-academy.com/en-us/azure/cdn/cdn-improve-performance#compression-rules brotli is already the preferred compression, but I still get a response with gzip compressing.

Azure Content Delivery Network
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Balazs Orban 11 Reputation points
    2021-01-19T10:08:18.673+00:00

    Hi there, I am still experiencing this problem, how does one change which Azure CDN product is used? I cannot seem to find its settings in the Azure Portal

    1 person found this answer helpful.
    0 comments No comments

  2. TravisCragg-MSFT 5,681 Reputation points Microsoft Employee
    2020-06-23T21:46:07.02+00:00

    This behavior will differ depending upon which Azure CDN product you are using. This is a known issue with the Verizon SKUs, but should work fine with the Standard Microsoft offering when requesting brotil.

    0 comments No comments

  3. Hrvoje Kusulja 126 Reputation points MVP
    2021-01-28T17:15:30.547+00:00

    Hello,
    I am using Azure CDN Premium from Verizon

    My origin for static file is Azure storage account / blob files.
    On static storage, i do have normal / uncompressed files, gzip files and brotli files.
    (does are generated automatically during dotnet 5 build for blazor wasm)

    Anyhow, I understand that Azure CDN does not support to change on-the-fly compresion models, however i need help to setup static redirection to brotli files? (probably using rules engine v4) based on header request.

    I have checked documentation:
    https://video2.skills-academy.com/en-us/azure/cdn/cdn-improve-performance

    • but it is unclear for scenario/setup/question

    Others have the same issue / situation / question:
    https://stackoverflow.com/questions/58087482/compression-behavior-in-verizon-cdn-in-azure
    https://github.com/MicrosoftDocs/azure-docs/issues/52449
    https://social.msdn.microsoft.com/Forums/en-US/09811055-574b-45d1-8843-597fd5e86b04/not-getting-brotli-compression-from-azure-cdn?forum=azurecdn

    0 comments No comments