Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
That means your app isn’t actually being served from /site/wwwroot at all — which is exactly what happens when WEBSITE_RUN_FROM_PACKAGE is set.
Where your stale chunks could still come from
Given you’ve confirmed the correct build is in the package:
- Front Door / Azure CDN
- These will happily serve an old
index.htmlor JS chunks even if Azure App Service has the new ones. - Purge it after deploy.
- These will happily serve an old
- App Service static file caching
- Even with
WEBSITE_DYNAMIC_CACHE=0, App Service can still serve cached static files from its own layer or from an Application Gateway in front.
- Even with
- Service Worker (React PWA)
- If your app was created with CRA and service workers were once enabled, an old worker can serve stale chunks from the user’s local cache regardless of Azure settings.
Next steps to actually clear it
- Purge any upstream CDN cache
- If you have Azure Front Door/CDN:
az afd endpoint purge \ --resource-group <RG> \ --profile-name <FDProfile> \ --endpoint-name <Endpoint> \ --content-paths "/*"
- If you have Azure Front Door/CDN:
- Force
index.htmlto always refresh- In Express:
if (path.endsWith('index.html')) { res.setHeader('Cache-Control', 'no-store'); }
- In Express:
- Kill any service worker
- Temporarily add this to your React
index.js:
Optional: Turn off RUN_FROM_PACKAGE If you want full manual control overif ('serviceWorker' in navigator) { navigator.serviceWorker.getRegistrations().then(regs => { regs.forEach(reg => reg.unregister()); }); }/site/wwwrootduring troubleshooting:Remove `WEBSITE_RUN_FROM_PACKAGE` Redeploy normally Now you can truly delete & confirm files in Kudu.
- Temporarily add this to your React
Your files are updating — they’re just being served from the mounted ZIP, and an upstream cache or service worker is handing out old chunks. The only way to fully prove this is to download the live package and purge all layers of caching above it.
some reference-