In this docs, I found this snippet:
After the activation step, the service worker will control all pages that fall under its scope, though the page that registered the service worker for the first time won't be controlled until it's loaded again.
I don't think I quite understand this sentence. For me, it seems to mean that:
- When the user requests a page, the browser always checks for new service worker (bypassing any cache).
- If a new service worker is present - install it and activate it.
- Wait for the user to reload the page for the new service worker to take charge.
It doesn't make sense to me. Why make a new service worker take charge only when the user restarts the page, why not make him a primary service worker right away?