none
abnormal operation of a static website hosted in a blob storage. The page does not update RRS feed

  • Question

  • Hi,
    i followed this tutorial to host a static web site in a blob storage. 
    https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website-host

    So I prepared my index.html page with a simple "Hello World!"
    After this operation I have a link similar to 
    https://myblobstorage.web.core.windows.net/
    that pointing to my index.html.It works.

    Later, following this tutorial,
    https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website-custom-domain
    I created a CDN endpoint on the static website endpoint.
    Now I have a new link to my index.html as 
    https://myendpoint.azuredge.net. I can see "Hello World!"

    Later I created a CNAME record with my provider's DNS management to point to my endpoint.
    Now I have a new link to my index.html page as 
    https://www.mysite.com. I can see "Hello World!"

    Later, i updateD my index.html, with "Hello World Microsoft": and now the problem begins.
    My storage link show me correctly "Hello World Microsoft";
    The enpoint link show me wrongly "Hello World!"
    My external link show me wrongly "Hello World!"

    Why doesn't the page update? What did I forget to do?
    I've already tried turning off and turning on the endpoint, to no avail.
    Thanks
    Tuesday, September 17, 2019 11:10 AM

Answers

  • Azure CDN edge nodes will cache assets until the asset's time-to-live (TTL) expires. After the asset's TTL expires, when a client requests the asset from the edge node, the edge node will retrieve a new updated copy of the asset to serve the client request and store refresh the cache.

    The best practice to make sure your users always obtain the latest copy of your assets is to version your assets for each update and publish them as new URLs. CDN will immediately retrieve the new assets for the next client requests. Sometimes you may wish to purge cached content from all edge nodes and force them all to retrieve new updated assets. This might be due to updates to your web application, or to quickly update assets that contain incorrect information. Source: https://docs.microsoft.com/en-us/azure/cdn/cdn-purge-endpoint 
    I'd recommend following the steps shown to purge the cached file to reflect the new content. 

    Let me know if this helps/works.
    Tuesday, September 17, 2019 9:54 PM
    Moderator

All replies

  • Azure CDN edge nodes will cache assets until the asset's time-to-live (TTL) expires. After the asset's TTL expires, when a client requests the asset from the edge node, the edge node will retrieve a new updated copy of the asset to serve the client request and store refresh the cache.

    The best practice to make sure your users always obtain the latest copy of your assets is to version your assets for each update and publish them as new URLs. CDN will immediately retrieve the new assets for the next client requests. Sometimes you may wish to purge cached content from all edge nodes and force them all to retrieve new updated assets. This might be due to updates to your web application, or to quickly update assets that contain incorrect information. Source: https://docs.microsoft.com/en-us/azure/cdn/cdn-purge-endpoint 
    I'd recommend following the steps shown to purge the cached file to reflect the new content. 

    Let me know if this helps/works.
    Tuesday, September 17, 2019 9:54 PM
    Moderator
  • Thanks Adam,

    as you suggest, i simply renamed index.html in index2.html and everything worked immediately.

    Wednesday, September 18, 2019 6:27 AM