New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 684578 link

Starred by 14 users

Issue metadata

Status: Closed
Owner: ----
Closed: Aug 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Task



Sign in to add a comment

Background Fetch API

Project Member Reported by harkness@chromium.org, Jan 24 2017

Issue description

Implement the Background Fetch API: Provide a service worker based download and upload mechanism which is persistent across service worker and browser restarts.

The system should provide a developer-controllable interface to schedule, query, pause, and cancel background downloads and uploads. After a scheduled fetch completes, the system should notify the developer of the outcome of the operation.

In progress downloads and uploads should be handled by the download manager and should be visible to users in a notification. The user should be able to pause and cancel actions from that interface.

Downloads and uploads should continue even if the developer's website is not loaded in a tab, and if Chrome is closed, the download should resume when Chrome opens again.

Changes to API surface:

partial interface ServiceWorkerRegistration {
  readonly attribute BackgroundFetchManager backgroundFetch;
};

[Exposed=(Window,Worker)]
interface BackgroundFetchManager {
  Promise<BackgroundFetchRegistration> fetch(DOMString tag, (RequestInfo or sequence<RequestInfo>) requests);
  Promise<BackgroundFetchRegistration?> getPending(DOMString tag);
  Promise<sequence<BackgroundFetchRegistration>> getAllPending();
};

[Exposed=(Window,Worker)]
interface BackgroundFetchRegistration {
  readonly attribute DOMString tag;
  readonly attribute FrozenArray<Request> requests;

  void abort();
};

partial interface ServiceWorkerGlobalScope {
  attribute EventHandler onbackgroundfetch;
  attribute EventHandler onbackgroundfetcherror;
  attribute EventHandler onbackgroundfetchabort;
};

[Constructor(DOMString type, BackgroundFetchEventInit init), Exposed=ServiceWorker]
interface BackgroundFetchEvent : ExtendableEvent {
  readonly attribute DOMString tag;
};

dictionary BackgroundFetchEventInit : ExtendableEventInit {
  required DOMString tag;
};

[Constructor(DOMString type, BackgroundFetchResultsEventInit init), Exposed=ServiceWorker]
interface BackgroundFetchResultsEvent : BackgroundFetchEvent {
  readonly attribute maplike<Request, Response> fetches;
};

dictionary BackgroundFetchResultsEventInit : BackgroundFetchEventInit {
  required maplike<Request, Response> fetches;
};

Links:
Public standards discussion: https://github.com/jakearchibald/background-fetch

Support in other browsers:
Internet Explorer: No public signals
Firefox: No public signals
Safari: No public signals



 
Description: Show this description

Comment 2 by peter@chromium.org, Jan 24 2017

Cc: -bever...@google.com peter@chromium.org owe...@chromium.org
Cc: mlamouri@chromium.org

Comment 4 by owe...@chromium.org, Mar 23 2017

Labels: -Pri-3 -M-58 M-59 Pri-2
Summary: OWP Launch Background Fetch API (was: Launch Background Fetch API)

Comment 5 by owe...@chromium.org, Apr 12 2017

Labels: -M-59 M-60
Owner: delph...@chromium.org

Comment 7 by owe...@chromium.org, Sep 12 2017

Labels: migrated-launch-owp Type-Task
This issue has been automatically relabelled type=task because type=launch-owp issues are now officially deprecated. The deprecation is because they were creating confusion about how to get launch approvals, which should be instead done via type=launch issues.

We recommend this issue be used for implementation tracking (for public visibility), but if you already have an issue for that, you may mark this as duplicate.

For more details see here: https://docs.google.com/document/d/1JA6RohjtZQc26bTrGoIE_bSXGXUDQz8vc6G0n_sZJ2o/edit

For any questions, please contact owencm, sshruthi, larforge

Comment 8 by owe...@chromium.org, Sep 13 2017

Summary: Background Fetch API (was: OWP Launch Background Fetch API)
Labels: -M-60
Owner: ----
Status: Available (was: Assigned)
Status: Closed (was: Available)
Closing this in favor of all open bugs on Background Fetch with label BlocksMVP set. There is a launch bug in place too: 704729

Sign in to add a comment