Compression not working with Azure front door

Mohammed Anzal 1 Reputation point
2022-10-28T14:08:11.147+00:00

I have hosted a site and added Azure front door into it. My hosted site is an ASP.NET MVC web application. On the initial load of the site, by clearing cache or for first-time users, most of the files including CSS and js loaded are compressed, but a few js files with query string, in my case the bundle js files are not getting compressed. One of the bundle files is 1.4MB and it loads the exact resource size, hence it takes too much time to load.

I have enabled Caching and compression from the Azure portal. Cant find what I am missing still, Somebody please help.255058-tempsnip11.png255171-tempsnip12.png255162-tempsnip13.png

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
576 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,253 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 22,776 Reputation points Microsoft Employee
    2022-10-28T22:12:11.957+00:00

    @Mohammed Anzal , Welcome to the Microsoft Q&A forum.

    Based on my understanding of your question above you have enabled compression on Azure Front Door and you have observed that few files are not compressed and file size is 1.4 MB.

    This scenario can happen if compression isn't enabled for the requested file type. From the documentation here, you can check if this particular file type is added to the Compressed file types list. You can modify the default list of MIME types on Optimizations page.

    Another troubleshooting step you can try in this case is to see if the file is compressed if compression is enabled at origin itself. This will help us understand if the issue is due to Azure Front Door or due to some other component.

    Additional reference - https://learn.microsoft.com/en-us/azure/frontdoor/standard-premium/troubleshoot-compression

    Hope this helps! Please let me know if you have any additional questions. Thank you!