background-fetch
background-fetch copied to clipboard
Explain connection to background sync
Just based on the names, I was confused on why we were building this when background sync already exists. From skimming https://developers.google.com/web/updates/2015/12/background-sync versus the intro to this document, it seems like background sync relies on the service worker being alive for the duration of the syncing operation (e.g. the fetch)? Whereas this does not? And this presents a more specific API that is for fetches only, not for performing any arbitrary operation when the user gets connectivity?
There's a little mention in the explainer https://github.com/WICG/background-fetch/blob/gh-pages/README.md#relation-to-one-off-background-sync.
As I move the content from the explainer into the spec (as examples and such) I'll make sure this is expended.
it seems like background sync relies on the service worker being alive for the duration of the syncing operation (e.g. the fetch)? Whereas this does not?
Pretty much. Background fetch is also designed to be user-visible, but that's kinda a side-effect of it being a long-running background operation that uses bandwidth.
Ah thanks, I went straight to the spec. Yeah, that seems like a good start. Plus maybe more examples in each category, with some reasoning for each.