Glossary
Definition
Service worker
Short definition
A service worker is a JavaScript file the browser runs in the background, separate from the page. It intercepts network requests, caches responses so the site works offline, and receives web-push events so the site can notify the user when it is closed.
Reviewed July 8, 2026
Service workers are one of the three requirements Chromium browsers check before offering the PWA install prompt (the others are HTTPS and a Web App Manifest).
They register once per origin and scope, live longer than any single page, and survive tab close. The browser wakes them for fetch, push and sync events.
Because they run outside the page, service workers cannot touch the DOM. They communicate with pages via postMessage or by mutating the cache the page reads from.
Related terms
Web App Manifest
A Web App Manifest is a JSON file (usually manifest.webmanifest) that declares your app's name, icons, start URL, theme colour and display mode. The browser reads it to render the install prompt and the home-screen icon.
Web push
Web push is a W3C standard that lets a website deliver push notifications to a user's device via the browser's push service, even when the site is closed. Delivery requires a service worker and explicit user permission.
Standalone display mode
Standalone is a value of the display field in a Web App Manifest. It tells the browser to launch the PWA in its own window with no address bar or tabs, so it looks and behaves like a native app. It is the most common display mode for installable PWAs.