Skip to Content
Platform.Ontology

Background Fetch

Downloads large files after the person leaves, with a progress notification.

Works without askingNotifications and backgroundBackgroundWeb browsersAfter you leave the site

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

BrowserStatusFirst versionReleasedNote
ChromeSupported742019-04-23None
EdgeSupported792020-01-15None
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported742019-04-24None
Samsung InternetNot supportedNot availableNot listedNone

How a site asks for it

APIregistration.backgroundFetch.fetch(id, requests, {downloadTotal, icons, title}); 'backgroundfetchsuccess' event
Permission namebackground-fetch
Browser compat keysapi.BackgroundFetchManager
How access is grantednone
What the user seesNo prompt; Chrome shows a persistent progress notification the person can cancel.
Needs a secure context (HTTPS)Yes
Needs a user gestureNo
How long it lastsPer fetch
How to take it backCancel from the progress UI
Inside an iframeService worker only

Typical flow

  1. Call backgroundFetch.fetch with requests and downloadTotal
  2. Browser shows progress notification
  3. Worker handles success or failure events

Data you get

What comes back: Fetch progress and result events
Shape: event
How often: per download

FieldTypeUnitRangePrecision
downloadTotalintegerbytesexpected size, hint only1

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

TypeExampleApps
videoA web streaming app downloads a movie for a flight. You can close the tab while it finishes in the background.None named
gamesA browser game downloads a large map pack after you leave the menu, and you get a notice when it is ready.None named
musicA web music player saves an album for offline listening while you do other things.None named
educationA learning site downloads a course video set for the commute.None named
newsA news reader site downloads the day's articles and images overnight for offline reading.None named
productivityA web office app saves a large shared folder to the device for offline work.None named
travelA 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

Good uses and abuse

Legitimate uses

  • Movie and podcast downloads

Known abuse

  • Large hidden uploads (progress UI shown)

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2019-04, Chrome 74: Background Fetch ships
  • 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.

On this page