Periodic Background Sync
Wakes an installed site every so often to refresh data.
In one line
Can refresh an installed web app now and then while closed, at times the browser picks
Wakes an installed site every so often to refresh data.
Lets an installed web app fetch updates on a schedule while closed. The browser, not the site, picks the actual times from engagement and battery.
What it can and can't do
What the user does: You install the web app and use it often
It can
- Fetch fresh news, mail or podcasts on a schedule while the app is closed
- Wake no more than about once every 12 hours
- Update quietly with no pop up
It cannot
- Run for a site that is not installed
- Choose the exact times, since the browser decides from your use and battery
- Work in Firefox or Safari
- Work on Samsung Internet
How it differs between platforms: Chrome and Edge on computers and Android, for installed apps only. Firefox, Safari and iPhone do not support it.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 80 | 2020-02-04 | Installed PWAs only |
| Edge | Supported | 80 | 2020-02-07 | None |
| Firefox | Not supported | Not available | Not listed | None |
| Safari | Not supported | Not available | Not listed | None |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Supported | 80 | 2020-02-04 | None |
| Samsung Internet | Not supported | Not available | Not listed | None |
How a site asks for it
| API | registration.periodicSync.register('tag', {minInterval}); 'periodicsync' event |
| Permission name | periodic-background-sync |
| Browser compat keys | api.PeriodicSyncManager |
| How access is granted | install |
| What the user sees | No prompt; Chrome only allows it for installed PWAs, and the permission follows engagement. |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | No |
| How long it lasts | Installed app only |
| How to take it back | Uninstall or Site settings |
| Inside an iframe | Service worker only |
Typical flow
- Install the PWA
- Register with minInterval
- Browser wakes the worker on its own schedule
- Worker fetches content
Data you get
What comes back: Periodic sync event
Shape: event
How often: browser chosen, minimum interval 12 hours (Chrome)
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
minInterval | integer | ms | 12 hours minimum in Chrome | browser decided |
Technical limits
- Not in Firefox or Safari
- Installed PWA only
- Frequency chosen by engagement
The story
What it is
An installed web app can wake up now and then to refresh its content, even when closed.
For you
There is no prompt in most cases. If you installed the app, it may refresh news or weather in the background, so it is up to date when you open it. It can use some battery and data.
For makers
Makers get a native feel: fresh content ready at launch. The browser decides when to wake the app, based on how often you use it. It is only for installed apps in Chromium.
Where you see it
| Type | Example | Apps |
|---|---|---|
| news | An installed news web app fetches the morning headlines before you wake up, so it opens instantly. | BBC News |
| music | A music web app refreshes your playlists and downloads new songs overnight. | None named |
| travel | A transit web app updates timetables and delays in the background. | None named |
| utilities | A weather web app refreshes the forecast so it is fresh when you open it. | None named |
| productivity | A mail web app syncs new messages in the background to save time at launch. | None named |
| games | A browser game refreshes daily challenges before you open it. | None named |
| shopping | A store web app refreshes deals and wishlists in the background. | None named |
Risks
- Battery and data use
- Runs when not in use
What the platform says
- Google Chrome: Periodic Background Sync. Lets installed web apps update themselves regularly in the background, so content is fresh when you open them.
Good uses and abuse
Legitimate uses
- News and email refresh
- Podcast downloads
Known abuse
- Staying alive after leaving
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 1 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2020-02, Chrome 80: Periodic Background Sync ships for installed PWAs
Related capabilities
Related
- Background Sync. Can retry sending queued data after you close the tab, once you are back online
Sources
How well checked: Based on official documentation.