After registration, a new service worker installs and can prepare required files. If an older worker still controls open pages, the new version waits; after activation it can handle pages and requests.
The demo steps through install, wait, activate, and control. Do not assume a new worker instantly controls every open tab.
When to use
Use it to understand offline caching and why an old page can remain after deployment.