Azure CDN Not Updating Cached Pages After Content Changes

Abdul Basit 0 Reputation points
2025-12-03T15:35:09.2666667+00:00

I’m experiencing an issue where my Azure CDN doesn’t purge or update cached pages even after I push new content from the origin server. I’ve tried both standard purge requests and setting shorter cache-control headers, but the old version keeps showing for several hours. This is causing inconsistency for users accessing updated travel guides on my site. The website is Australia City Guide, and I’m trying to ensure visitors always see the latest version of each page.

Has anyone faced similar CDN cache refresh delays or found a reliable way to force instant updates across endpoints?

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

1 answer

Sort by: Most helpful
  1. Vallepu Venkateswarlu 2,820 Reputation points Microsoft External Staff Moderator
    2025-12-03T17:06:33.4966667+00:00

    Hi @ Abdul Basit,

    Welcome to Microsoft Q&A Platform

    I can see that you're dealing with some frustrating cache issues with your Azure CDN and the outdated travel guides not reflecting the new content. Here are some steps and considerations that might help you resolve this:

    1. Purge the Cache Again: It seems you’ve tried standard purging, but sometimes it’s beneficial to use more aggressive options. You can try the following:
      • Purge Specific Files: Navigate to your CDN endpoint in the Azure portal and select the Purge button. Enter the path of the files you want to purge.
      • Use Wildcards: Consider using wildcards in your purge request (e.g., /path/to/update/*).
      • Purge All: If specific purging doesn’t work, try selecting Purge All to clear the entire CDN cache. This can ensure all stale files are removed.
    2. Double-Check Cache-Control Headers: Make sure that your cache-control headers are set correctly in your origin server. Using shorter expiration times, such as a few minutes, can help, but ensure the origin files are accessible without caching for immediate updates. For example:
      • Use Cache-Control: no-cache on important files that need immediate updates.
    3. Verify Origin Content: Confirm that the new content is being served correctly from your origin server. Use a request similar to https://your-origin-url/path/to/your/file to check that you're getting the updated content directly from the origin.
    4. Monitor for Propagation Delay: Sometimes purging might take longer than expected. If you’ve purged your files, wait for about 15-30 minutes before checking the CDN again, as changes can take time to propagate across all edge nodes.
    5. Inspect Caching Behavior: Use the browser's developer tools (F12) to inspect the response headers and see if the CDN is hitting the cache. Look for the x-cache header; if it indicates a cache hit, your browser may be serving the old file from its cache rather than the CDN.
    6. Consider Versioning the Content: If the above methods are still causing issues, you might consider appending version numbers or cache-busting query strings to your asset requests. For instance, change file.js to file.js?v=2.

    If you continue to encounter delays or issues, here are some follow-up questions that could help diagnose further:

    • What specific content types (HTML, images, etc.) are you experiencing issues with?
    • Have you noticed any patterns in the cache update delays, such as specific times when this tends to happen more often?
    • Can you confirm if the cache-control settings on your origin server are correctly configured to allow for quick refreshes?
    • Have you checked the response headers for any pertinent caching directives that might affect the CDN behavior?

    I hope this helps you get your CDN caching under control! If you have more questions or run into other issues, feel free to reach out again.

    References:

    If you have any questions, please leave a comment below, I will respond to you.
    Please do not forget to 210246-screenshot-2021-12-10-121802.pngand “up-vote” wherever the information provided helps you, this can be beneficial to other community members**.**

    0 comments No comments

Your answer

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