dev-resources.site
for different kinds of informations.
Help: Should a new service worker force a refresh to update a PWA?
Published at
1/4/2020
Categories
help
pwa
serviceworkers
Author
Mike Healy
I have a frontend app called Finskore for scoring games of Finska that I want to enable offline.
I'm following Google's PWA guide about service workers and it seems that an updated service worker will only take effect on the following visit. The existing SW runs the current session, but the new version is installed for the next network visit.
My question is, should I try and detect when a new service worker has been installed and force a refresh at that time? The reason being to get the new version of the app for the immediate session.
I was wondering if I could compare cache version names on install and do a window.reload() if they are different?
Thoughts?
Articles
8 articles in total
Using S3 Lifecyle Rules with Spatie Laravel Backups
read article
Running Jest with a Vue2 application
read article
Dark Mode Toggle with Alpine & Tailwind
read article
Lighter LoDash Builds for Laravel
read article
16GB or 32GB RAM for Web Development?
read article
Help: Should a new service worker force a refresh to update a PWA?
currently reading
How to Build an Image Carousel
read article
Improving Performance for Low-Bandwidth Users with save-data
read article
Featured ones: