Intent to Experiment: Background Fetch

220 views
Skip to first unread message

na...@chromium.org

unread,
Oct 4, 2018, 1:03:50 PM10/4/18
to blink-dev

Contact emails

jakear...@chromium.org, pe...@chromium.org, raya...@chromium.org, na...@chromium.org


Spec

https://wicg.github.io/background-fetch/

 

Test Website

https://backgroundfetch.com/ (code here)


Summary

Background Fetch API provides a service worker based download and upload mechanism which is persistent across service worker and browser restarts.

The system provides a developer-controllable interface to schedule, query, pause, and cancel background downloads and uploads. After a scheduled fetch completes, the system will notify the developer of the outcome of the operation by sending an event to the service worker.

In progress downloads and uploads are handled by the download manager and will be visible to users in a notification. The user will 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.


Limitations

The current implementation has a few limitations, where it doesn’t completely align with the spec:

  1. Only downloads are supported at this time.

  2. Requests that require CORS preflight are blocked.

  3. There’s no access to downloaded content while the download is in progress.

We’ll continue to iterate on the implementation, but the current state makes a number of use-cases work. It’s at a stage where we feel it’s important to start gathering feedback.


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/Ia9_-CVrl1U/jEBQGVv_BQAJ


Goals for experimentation

To measure the real world impact of this feature before shipping. We will track the usage, error rates, stability and basic performance numbers. Experimentation will also let us gauge interest in the feature.


Experimental timeline

We’d like to run this for one or two milestones, starting with M71

(M71 cuts around Oct 11, will go Stable around beginning of Dec ~ end of Jan 2019)


Any risks when the experiment finishes?

Low.


Ongoing technical constraints

None.


Debuggability

Background Fetch initiated downloads are clearly identified at chrome://download-internals.


Will this feature be supported on all five Blink platforms supported by Origin Trials (Windows, Mac, Linux, Chrome OS, and Android)?

Yes, except WebView.

 

OWP launch tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=704729


Link to entry on the feature dashboard

https://www.chromestatus.com/features/5712608971718656


Rick Byers

unread,
Oct 4, 2018, 3:19:08 PM10/4/18
to na...@chromium.org, blink-dev
LGTM

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/3b74c99a-2d1c-4394-9a99-80879feafac5%40chromium.org.

Daniel Vogelheim

unread,
Oct 15, 2018, 6:49:45 AM10/15/18
to na...@chromium.org, blink-dev
On Thu, Oct 4, 2018 at 7:03 PM <na...@chromium.org> wrote:

Summary

Background Fetch API provides a service worker based download and upload mechanism which is persistent across service worker and browser restarts.

The system provides a developer-controllable interface to schedule, query, pause, and cancel background downloads and uploads. After a scheduled fetch completes, the system will notify the developer of the outcome of the operation by sending an event to the service worker.

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


Please file for a privacy review of this feature. (I'm very happy to read about the user notification + controls, but the PWG would like to have a second look at the UI.) Thanks.

Mugdha Lakhani

unread,
Oct 15, 2018, 11:59:47 AM10/15/18
to voge...@chromium.org, blin...@chromium.org
Sure, will do. :)

yram...@gmail.com

unread,
Dec 6, 2019, 8:48:37 AM12/6/19
to blink-dev

yram...@gmail.com

unread,
Dec 6, 2019, 8:49:04 AM12/6/19
to blink-dev


بتاريخ الخميس، 4 أكتوبر، 2018 8:03:50 م UTC+3، كتب na...@chromium.org:

elle.k...@gmail.com

unread,
Mar 3, 2020, 4:17:53 PM3/3/20
to blink-dev
Hello, 

I want to use Background-Fetch for my application. It seems that the Origin Trial had ended in April 2019. Can I still use the API?

Can it be used only with a specific version of Chrome? Would the users need to turn on experimental features or something before using it?

Ideally the users can just open Chrome and use this feature, without changing the browser configurations. 

Last question - is this production ready?

Thank you!

Rayan Kanso

unread,
Mar 10, 2020, 3:04:23 PM3/10/20
to elle.k...@gmail.com, blink-dev
Hi,

Background Fetch launched in M74 (Intent To Ship) a few weeks after the experiment expired. You can use it on all platforms directly without enabling any flags. Yes it is production ready, if you have any issues please file a bug at crbug.com under the Blink>BackgroundFetch component.

Thanks,
~Rayan

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/925c9fdf-989e-4f87-96b9-4b0ffac03dc1%40chromium.org.
Reply all
Reply to author
Forward
0 new messages