July 2018
Intermediate to advanced
354 pages
8h 51m
English
In Chapter 1, Introduction to Progressive Web Apps, we created a basic service worker that pre-cached the 2048 game assets. In this and the following chapters, we will dive deeper into the details of a service worker.
The service worker goes through several stages in its overall life cycle. A service worker is registered. Once the script is loaded, it triggers the ‘install’ event. At this point, the service worker is not in control of the client (browser tab).
When the service worker is cleared to control client contexts, the activate event is triggered. After this, the service worker is fully active and in control of any active clients, be they tabs or background processes.
Proper service workers take advantage ...
Read now
Unlock full access