Azure Static Web app - old verstion still in cache

I've put up several simple static web apps and one in particular keeps reverting to the old version. If I go into Dev tools in a browser and force empty cache and hard reload, the new version comes up. But if i leave dev tools and do a reload, the old version is back.
And not just for me. Even people who have never gone to the page see the old version. The new version does seem to come up, even for me, in incognito sessions.
I've purged the Azure CDN (which i hadn't set to include those pages anyway). No change.
I've looked for the pages on Azure Storage Explorer to see if there's a cache setting I can change, but I can't find any of the sites' html through Azure Storage Explorer.
How the heck do I get the new version to show?
Apologize for the late response and inconvenience with this issue! I'm checking on this internally with our product engineering team and will get back to you soon. Thanks for your patience and co-operation in this matter!
Thanks for asking question! Well the fact that you’ve added an Azure CDN in front adds some complexity.
Probably the easiest way to debug this is to work backwards. If you accesses the site through the default hostname (i.e. red-field-1234) instead of through the cdn, do you still see the issue with the new version not being applied?
This is the direct link. https://icy-flower-0dfee1e03.azurestaticapps.net/ Still showing me a version from - now - a couple of weeks ago.
I've purged the CDN several times. I could turn it off completely, if that'd help figuring this out.
Thanks for reply! Could you please try the following test.
If you inspect the traffic when reaching the default hostname, you should see a header in the response (for any file, I chose index.html) like etag: "30060206".
After you push an update you should see this etag header change. If you are still seeing the same content but the etag has changed, then there may be something wrong with your deployments.
Let us know.
will do. Deployments are straight from github and haven't shown any errors.
So as you say, I see etag: "30060206" on the new version. I can only see the etag if i reload the page with dev tools open. But if i have dev tools open i always get the new version. See the video here.
https://www.youtube.com/watch?v=3a4ePWOCzvQ
I did a small change and pushed a change through github. the etag is now etag: "25540746"
And, after a couple of minutes of the same problem, I hit reload one more time and - taTAAAAA - the new version shows.
I have NO idea what's been going on, but it's stopped. Have a look at the video....see at least that I wasn't making it up!
H
I'm having the same issue with Azure App Service. It's a static Next JS export app. No matter what I seem to do, it shows the old version at first until I press F5. I then close the window, go back in, and it is back to the old one. I've tried adding the following options also:
WEBSITE_LOCAL_CACHE_OPTION = Never
WEBSITE_DYNAMIC_CACHE = 0
and in web.config, added to <StaticContent> to have <clientCache cacheControlMode="DisableCache" />
This is on a "Production P2V2" app service. I've restarted the app service several times as well.
Thanks a lot for all the effort you put in for debugging this! Could you please confirm if you have inspect open and the “disable cache” box is checked? As then the browser will skip any cached content and pull the new version.
If this is the case, then this confirms that the client is caching old content which is the issue here. And this may be either because of a service worker or header overrides.
Let us know.
Just checking if you have chance to see above response. Please let us know if issue persists.
Sign in to comment
1 answer
Sort by: Most helpful
anyone have solution here, i also had same issue had to clear cache and hard load to see changes
Sign in to comment
Activity