❔ Blazor WASM PWA clear all cache and update application
My app does not update automatically on new versions (I use WASM). Since it's PWA the
no-cache
header does not do anything... Is there a way with JS to clear all files locally or is the service worker able to update files? if so then how?
Thanks17 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
@Hisme if you don't mind we could continue here
So how would I set up my service worker to auto update
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
ah I see @Hisme , so if I update the comment on the service worker it will update the next time you load the browser. Is there a way to clear cache via JS interop?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
what is the function to clear it? I can do version control via C#
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I had tried that in the past but the cache would not get cleared
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
so if I have the new service worker version flag then
location.reload(true)
will actually clear the cache?Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
ah ok
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
what if I have a
no-cache
header, will it auto update the SW?
I use nginx to serve itUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
uhm sure we could call
sent you a friend request
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.