You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jsakamoto The fix provided in the service-worker.published.js,
Change the code inside the onFetch() function from const request = shouldServeIndexHtml ? 'index.html' : event.request; to const request = shouldServeIndexHtml ? (new URL(event.request.url)).pathname.replace(/\/$/, '') + '/index.html' : event.request;.
creates a cache issue.
Steps:
Deploy a blazor wasm app with pwa enabled.
Now make some changes in Index.razor screen.
Now publish and deploy again and navigate to index url of the app.
Note that new changes will not be reflected. You need to clear application cache and then refresh to see the new changes.
Video showing the problem:
I have an intial version deployed.
I made code change in Index.razor by adding <h1 style="background-color:yellow">Hello, Cache Problem</h1>.
Published and deployed the app.
Navigated to index url of the app.
Refreshed and expecting to see new changes but nothing happens.
Cleared cache and refreshed. Now I can see new code changes.