Intent to Implement: Periodic Background Sync

220 views
Skip to first unread message

na...@chromium.org

unread,
Apr 29, 2019, 9:01:08 AM4/29/19
to blink-dev

Contact emails

na...@chromium.org, kenjibaheux@chromium.org


Explainer

https://github.com/beverloo/periodic-background-sync


Design doc/Spec


PRD. Design doc.

Tag review.


Summary

Periodic Background Sync is an extension of Background Sync. It allows websites to register tasks to be run in a service worker at periodic intervals with network connectivity.


Motivation

The API will allow offline-first web apps to periodically update state, and will allow periodic content producers like news sites to push content to users’ devices periodically.


At present, sites can achieve this using Push messages, but need to set up a server for that.


Risks

Interoperability and Compatibility

No risk of breaking interoperability and compatibility.


Ergonomics

We expect developers to use the Permissions API before registering a Periodic Sync, and in the event listener, using Fetch or Background Fetch API to download updated state.


Activation

Documentation with examples should help make understanding usage easy.


Debuggability

rayankans@ is working on debuggability support for a few APIs that use service workers, so that relevant events can be logged even when Chrome isn’t running.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes, except WebView. This is because there are difficulties with the lifetime of a Webview client, and with identifying the right webview client on a page to which the Periodic Sync event should be dispatched.


Link to entry on the feature dashboard

Feature creation on the dashboard is currently broken. [Bug]


Requesting approval to ship?

No


Joe Medley

unread,
Apr 29, 2019, 3:39:15 PM4/29/19
to na...@chromium.org, blink-dev
We have this tagged as p0, but it is an intermittent issue. Here's the shell. Can you please finish filling it in.

https://www.chromestatus.com/feature/5689383275462656
Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.


--
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/d55ccfb4-ef8f-4c38-899e-11ae491f35a5%40chromium.org.

nekr....@gmail.com

unread,
Apr 29, 2019, 7:20:27 PM4/29/19
to blink-dev
Will installed PWAs have this API "granted" AKA being able to use without requesting additional permission?

Mugdha Lakhani

unread,
Apr 30, 2019, 8:25:55 AM4/30/19
to nekr....@gmail.com, blink-dev
"Will installed PWAs have this API "granted" AKA being able to use without requesting additional permission?"
For Chrome, that's the plan, yes.
There is an existing "Background Sync" site setting. If blocked, this setting will also disable Periodic Background Sync for installed PWAs.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Mugdha Lakhani

unread,
May 1, 2019, 6:04:40 AM5/1/19
to nekr....@gmail.com, blink-dev
Thanks Joe! I've updated the chromestatus entry.
Reply all
Reply to author
Forward
0 new messages