Service Worker Registration | Web Fundamentals | Google Developers
Hmm …seems like I should probably wait for the load
event before triggering navigator.serviceworker.register()
.
Hmm …seems like I should probably wait for the load
event before triggering navigator.serviceworker.register()
.
Ooh, this is a tricky scenario. If you decide to redirect all URLs (from, say, a www
subdomain to no subdomain) and you have a service worker running, you’re going to have a bad time. But there’s a solution here to get the service worker to remove itself.
The server-side specifics are for NGINX but this is also doable with Apache.
The life cycle of a Service Worker—with all its events and states—is the one bit that I’ve never paid that much attention to. My eyes just glaze over when it comes to installation, registration, and activation. But this post explains the whole process really clearly. Now it’s starting to make sense to me.
Registration is now open for Web Directions North in Vancouver in February. Come for the geeky presentations, stay for the skiing.