Skip to content
Glossary

What is a service worker?

A service worker is a script a web app runs in the background to handle network requests, which lets it cache files and work offline.

It sits between the app and the network. When you open the app, the service worker can answer from a cache instead of the internet, so pages load quickly and keep working when the connection drops.

Service workers also power push notifications and background sync. Having one doesn't guarantee an app works offline: that depends on what the app chooses to cache.

Related terms