Query string caching behavior "Use Query String" is being ignored in Azure Front Door

Vasily Kornienko 35 Reputation points
2025-03-07T10:09:04.94+00:00

We have an Front Door serving our main website and CDN for that website.

CDN endpoint uses main website as origin.

We want to serve all javascript and css files via CDN, we put file content hash to the url parameter in order to trigger cache update after each release.

We use "Use Query String" for "Query string caching behavior" option that should query origin server for the new file version if any url parameter (in our case hash value) is changed.

What is expected: after we release new website version with new css/js content all requests to the cdn version of the updated files should be update file versions on the CDN immediately (on first request with new hash in url parameter) due to "Use Query String" configuration.

Actual behavior: after we release new css/js content for existing files and querying these files with new hash values in url parameters Azure Front Door continues to return previous file versions for some times (several hours I guess).

This is totally inacceptable as most clients will cache previous file version for the new url with new hash value.

Please fix it ASAP or we'll have to move to other service providers.

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
850 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Venkat V 2,545 Reputation points Microsoft External Staff Moderator
    2025-03-11T12:52:42.3666667+00:00

    Hi @Vasily Kornienko

    I have reviewed your scenario and tested the requirement in my lab.

    I created an App Service with different versions in the application and attached it to Front Door. It is working as expected, fetching from the origin on the first request and serving from the cache within a minute in my case.

    Route configuration

    enter image description here

    Orgingroup

    enter image description here

    Optimization

    enter image description here

    Optimization

    enter image description here

    When I change the configuration in the application, such as updating the version, Front Door requests the origin and displays the result with the new version. However, from the next request onward, it serves the response from the cache.

    enter image description here

    Below is the the Cache report result

    enter image description here

    Kindly clear the cache and cookies and test again. If the issue persists, try testing in another browser.

    The default behavior of Azure Front Door is to treat it as a new asset if the URL changes within a short period of time.

    User's image

    Reference: Query string behavior

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.