coderef

Periodic background syncLimited availability

The periodic background synchronization API fires a recurring periodicsync event in a service worker. You can use this to update data in the background at regular intervals.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–79Not supported
80+Supportedsince Feb 4, 2020
Current: 155
Edge
12–79Not supported
80+Supportedsince Feb 7, 2020
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
18–79Not supported
80+Supportedsince Feb 4, 2020
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Firefox, Safari, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: PeriodicSyncEvent.

Feature detection

JS · check before using
if ("PeriodicSyncEvent" in globalThis) {
  // PeriodicSyncEvent is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (9). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
PeriodicSyncEvent8080✕✕80✕✕
PeriodicSyncEvent.PeriodicSyncEvent8080✕✕80✕✕
PeriodicSyncEvent.tag8080✕✕80✕✕
PeriodicSyncManager8080✕✕80✕✕
PeriodicSyncManager.getTags8080✕✕80✕✕
PeriodicSyncManager.register8080✕✕80✕✕
PeriodicSyncManager.unregister8080✕✕80✕✕
ServiceWorkerGlobalScope.periodicsync_event8080✕✕80✕✕
ServiceWorkerRegistration.periodicSync8080✕✕80✕✕