Service Worker Life Cycle
The web page has a totally different lifecycle than the Service Worker. To install a Service Worker you have to first register it on your main page. Registering a Service Worker will the cause browser to download the Service Worker file and initiate its install step in the background.
The service worker adds significant performance benefits, which can go even beyond what is possible when compared to browser caching practices.
Here below are some good practices to be followed to try to obtain a significant performance gain.