Background Fetch
Downloads large files after the person leaves, with a progress notification.
In one line
Can download or upload big files after you leave the tab, with a progress notice
Downloads large files after the person leaves, with a progress notification.
Lets a site download or upload big files outside the tab. The browser shows progress UI so the person can see and cancel it.
What it can and can't do
What the user does: You tap Download for a movie, podcast or large file and close the tab
It can
- Keep a large download or upload going after you leave the page
- Show a progress notice that you can see and cancel
- Finish the file and tell the site when it is done
It cannot
- Run silently, since Chrome shows a persistent progress notice
- Work in Firefox or Safari
- Work on Samsung Internet
- Keep going forever, since it stops when you cancel or the file finishes
How it differs between platforms: Chrome, Edge and Chrome for Android only. Firefox, Safari and iPhone browsers do not support it.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 74 | 2019-04-23 | None |
| Edge | Supported | 79 | 2020-01-15 | 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 | 74 | 2019-04-24 | None |
| Samsung Internet | Not supported | Not available | Not listed | None |
How a site asks for it
| API | registration.backgroundFetch.fetch(id, requests, {downloadTotal, icons, title}); 'backgroundfetchsuccess' event |
| Permission name | background-fetch |
| Browser compat keys | api.BackgroundFetchManager |
| How access is granted | none |
| What the user sees | No prompt; Chrome shows a persistent progress notification the person can cancel. |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | No |
| How long it lasts | Per fetch |
| How to take it back | Cancel from the progress UI |
| Inside an iframe | Service worker only |
Typical flow
- Call backgroundFetch.fetch with requests and downloadTotal
- Browser shows progress notification
- Worker handles success or failure events
Data you get
What comes back: Fetch progress and result events
Shape: event
How often: per download
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
downloadTotal | integer | bytes | expected size, hint only | 1 |
Technical limits
- Not in Firefox or Safari
- Visible UI cannot be hidden
The story
What it is
A site can keep downloading a big file after you leave the page, and show progress in a notification.
For you
You see a progress notification for a big download, like a movie or a game level. You can close the tab and it keeps going. When it finishes you get a note.
For makers
Makers can offer offline movies, music and big game assets on the web, as native apps do. It keeps users from losing a half finished download. It uses the service worker, so it runs after the tab is gone.
Where you see it
| Type | Example | Apps |
|---|---|---|
| video | A web streaming app downloads a movie for a flight. You can close the tab while it finishes in the background. | None named |
| games | A browser game downloads a large map pack after you leave the menu, and you get a notice when it is ready. | None named |
| music | A web music player saves an album for offline listening while you do other things. | None named |
| education | A learning site downloads a course video set for the commute. | None named |
| news | A news reader site downloads the day's articles and images overnight for offline reading. | None named |
| productivity | A web office app saves a large shared folder to the device for offline work. | None named |
| travel | A trip planner web app downloads offline maps and guides before you travel. | None named |
Risks
- Uses data and storage
- Runs after you leave
What the platform says
- Google Chrome: Background Fetch. Lets web apps start large downloads that keep going even if you close the tab, with a progress notice.
Good uses and abuse
Legitimate uses
- Movie and podcast downloads
Known abuse
- Large hidden uploads (progress UI shown)
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 | 0 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2019-04, Chrome 74: Background Fetch ships
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.