A service worker is JavaScript code that, once registered with an associated origin and scope, will respond to browser-initiated events, even when the pages it controls are no longer open. By handling `fetch` events, service workers can provide custom network behavior, like offline support (via the Cache API). By handling `push` events, service workers can be "woken up" and display notifications.

- Stackoverflow.com Wiki
6 articles, 0 books.

A service worker is a script that stands between your website and the network, giving you, among other things, the ability to intercept network requests and respond to them in different ways.


Just like with appcache, it is possible with Service Workers to put a full website in the cache when loading the first visited page.


If you're wondering what a service worker is, it's like a little alien that lives on your page and relays messages for you. It can detect when you have an Internet connection and when you don't, and can responds in different ways based on the response.


When you send an SMS message but your phone doesn’t have great signal it will continue to try to send the message in the background, even if you close the app. Pretty useful right? In this post we’re going to see how to replicate this behaviour in a web application using the Background Sync API from the Service Worker.


A Progressive Web App uses modern web capabilities to deliver an app-like user experience.


Service Workers are a type of Web Worker that are shared between a domain scope, and can do cool things like intercept network requests and cache them. This is powerful because it means you can improve the performance of your app for commonly accessed assets and even go offline (as the Service Worker acts a network proxy).