Background Sync API

A service worker API that defers a task until the device has a working connection, then fires a sync event to run it, even if the page has been closed.

In more detail

The page stores pending changes in IndexedDB and registers a sync tag; when the connection returns the service worker's sync handler sends them. It is currently supported mainly in Chromium-based browsers, so keep a fallback.

Related terms

Taught in

References