Bug 214548 - Feature Request: Implement the Background Fetch API
Summary: Feature Request: Implement the Background Fetch API
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-20 04:27 PDT by Thomas Steiner
Modified: 2021-11-03 16:47 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Steiner 2020-07-20 04:27:37 PDT
Spec: https://wicg.github.io/background-fetch/

Article: https://developers.google.com/web/updates/2018/12/background-fetch

Use case: Fetching (as in down- or uploading) content without the page being open.

Example:

```js
navigator.serviceWorker.ready.then(async (swReg) => {
  const bgFetch = await swReg.backgroundFetch.fetch('my-fetch', ['/ep-5.mp3', 'ep-5-artwork.jpg'], {
    title: 'Episode 5: Interesting things.',
    icons: [{
      sizes: '300x300',
      src: '/ep-5-icon.png',
      type: 'image/png',
    }],
    downloadTotal: 60 * 1024 * 1024,
  });
});
```
Comment 1 Felix Gnass 2020-07-23 02:29:00 PDT
We would love to add background fetch to the PWA of German public broadcaster ZDF (https://pwa.zdf.de) so having support for this in Safari too would be highly appreciated.
Comment 2 Radar WebKit Bug Importer 2020-07-24 19:26:52 PDT
<rdar://problem/66086044>