Periodic Background Sync support
Published Updated
Periodic Background Sync lets a web app’s service worker periodically synchronize data in the background, so a PWA can show fresh content immediately on launch instead of fetching it while the user waits.
Browser & ecosystem support
Section titled “Browser & ecosystem support”- Legend
- Yes
- Partial
- Flag
- No
- Unknown
| Browser / Platform | Support | Versions | Confidence | Source | Notes |
|---|---|---|---|---|---|
| Chrome (Desktop) | Yes | 80 | high | source | — |
| Chrome (Android) | Yes | 80 | high | source | 1 |
| Edge (Desktop) | Yes | 80 | high | source | 2 |
| Firefox (Desktop) | No | — | high | source | 3 |
| Firefox (Android) | No | — | high | source | 45 |
| Safari (macOS) | No | — | high | source | 6 |
| Safari (iOS) | No | — | high | source | 78 |
| Samsung Internet | Yes | 13.0 | high | source | 9 |
| WebView (Android) | No | — | high | source | 10 |
- Derived by browser-compat-data mirroring from Chrome.
- Derived by browser-compat-data mirroring from Chrome.
- No Firefox support is recorded in browser-compat-data.
- No Firefox for Android support is recorded in browser-compat-data.
- Derived by browser-compat-data mirroring from Firefox.
- No Safari support is recorded in browser-compat-data.
- No Safari on iOS support is recorded in browser-compat-data.
- Derived by browser-compat-data mirroring from Safari.
- Derived by browser-compat-data mirroring from Chrome Android.
- Implementation tracking: https://crbug.com/40151529.
How to use it
Section titled “How to use it”Register a periodic sync tag with a minimum interval (in milliseconds) once the service worker is ready:
async function registerPeriodicSync() { const registration = await navigator.serviceWorker.ready; await registration.periodicSync.register('get-latest-news', { minInterval: 24 * 60 * 60 * 1000, });}In the service worker, handle the periodicsync event by tag:
self.addEventListener('periodicsync', (event) => { if (event.tag === 'get-latest-news') { event.waitUntil(fetchAndCacheLatestNews()); }});How to detect it at runtime
Section titled “How to detect it at runtime”Feature-detect periodicSync on the service worker registration before registering.
When it is absent, fall back to refreshing content on page load instead:
async function scheduleRefresh() { const registration = await navigator.serviceWorker.ready; if ('periodicSync' in registration) { await registration.periodicSync.register('get-latest-news', { minInterval: 24 * 60 * 60 * 1000, }); } else { await fetchAndCacheLatestNews(); }}Practical checklist
Section titled “Practical checklist”- Chrome grants the periodic background sync permission only to an installed web app that has been launched as a separate application — not to a page open in a regular browser tab.
- The browser, not your app, decides the actual sync frequency based on site engagement
and other signals; treat
minIntervalas a lower bound, not a guarantee. - Firefox and Safari do not implement this API — always provide a fallback refresh path (e.g. on page load) for those browsers.
- Use distinct
tagvalues for independent periodic tasks and branch onevent.tagin theperiodicsynchandler.
Where to go next
Section titled “Where to go next”← Back to the Compatibility explorer.