-
is a script that run in the background, separate from your web page. It responds to events, including network requests made from pages it serves. A service worker has an intentionally short lifetime.
-
it wakes up when it gets an event and runs only as long as it needs to process it.
-
service workers provide the web app the ability to work offline.
-
also includes features like push notification and background sync.