Background Fetch - Interactive Lab | IconVault

Run the real Background Fetch registration flow: service worker checks, progress events and results, with honest fallbacks. Free, in-browser.

All tools

Background Fetch

Real registration flow with download progress events

5 of 5 free uses left

Registration input

5 of 5 free runs left. Everything runs in your browser.

Honest requirements

  • Chrome or Edge on desktop (no Firefox/Safari support).
  • HTTPS or localhost.
  • An active service worker on the page; the fetch ID must be unique.
  • Downloads survive tab close and are reported to the SW via backgroundfetchsuccess.

Live registration flow

  1. 1

    1. Service worker support

    Not run yet.

  2. 2

    2. Active service worker (ready)

    Not run yet.

  3. 3

    3. backgroundFetch on registration

    Not run yet.

  4. 4

    4. Register background fetch

    Not run yet.

  5. 5

    5. Download progress events

    Not run yet.

  6. 6

    6. Final result

    Not run yet.

Minimal code to run this on your own site

Background Fetch needs a service worker. Register one, then call fetch from any controlled page:

// page.js (runs on a page controlled by your service worker)
const reg = await navigator.serviceWorker.ready;
const bg = reg.backgroundFetch; // undefined where unsupported
const task = await bg.fetch("my-download", ["/big.zip", "/big2.zip"], {
  title: "Downloading assets",
  // downloadTotal: 50 * 1024 * 1024, // optional, enables %
});
task.addEventListener("progress", () => {
  console.log(task.downloaded, "/", task.downloadTotal);
});

// sw.js
self.addEventListener("backgroundfetchsuccess", (event) => {
  // store responses in Cache Storage for offline use
});

About this tool

IconVault's Background Fetch playground walks the genuine registration flow step by step: service worker support, `navigator.serviceWorker.ready`, the `backgroundFetch` manager, `fetch()` registration, live progress events, and the final success or failure result. Each step reports its real outcome, so you see exactly where the flow stops on your browser instead of a simulation. It is free and runs fully in your browser.

Background Fetch lets large downloads continue even after the user closes the tab, with the browser showing download UI and firing `backgroundfetchsuccess` in your service worker. The lab explains the hard requirements, Chrome and Edge desktop only, HTTPS, an active service worker, unique fetch IDs, and includes the minimal page plus service-worker code to deploy it on your own site.

Frequently asked questions

Popular searches

background fetch apibackgroundfetchbackground fetch javascriptservice worker background fetchbackgroundfetch.fetchbackground fetch demobackground fetch examplebackgroundfetchsuccessbackground fetch progressbackground fetch browser supportbackground fetch chromebackground fetch firefoxlarge file download pwadownload continues after tab closeoffline download service workerbackground sync vs background fetchperiodic background syncservice worker downloadpwa large downloadsbackground fetch tutorialmdn background fetchbackgroundfetchmanagerregistration.backgroundfetchbackground fetch httpsbackground fetch localhostbackground fetch failure reasonbackground fetch abortbackgroundfetchfailbackgroundfetchabortservice worker recipescache large files pwadownload podcast offline webvideo download pwabackground fetch typescriptbackground fetch polyfillis background fetch supportedcaniuse background fetchbackground fetch androidbackground fetch iosworkbox background fetchbackground fetch quotadownloadtotal background fetchbackground fetch iconshow to use background fetch apibackground fetch step by stepbackground fetch playgroundtest background fetchbackgroundfetch example codeservice worker large downloadpwa download managerbackground fetch downloadtotal

More tools

Coming soon

CLI

Coming soon

Figma plugin

Coming soon

VS Code extension

Coming soon

Chrome extension

Coming soon

AI icon generator

Coming soon

Team workspaces

Coming soon

View all 10+ tools →