Re: [w3ctag/design-reviews] Periodic Background Sync (#367)

Yes this API has already been shipped in Chrome, sorry for the delayed response and thanks for the suggestions!

> @kenchris and I were reviewing this specification during our Wellington F2F.
> One aspect is that there is currently no way for servers administrators to block such traffic.
> It would be good to be able to flag those requests (via a HTTP header) so that servers can deny traffic if unwanted.
The website is able to stop periodic sync by calling 'unregister' anytime through their service worker. Are you suggesting adding a way for IT admins to block all periodicSync traffic for a given site? They're able to do so by auto-denying the periodic-background-sync permission. In Chrome, that's possible by disabling the "Background Sync" content setting for the site.

> Also, in case of HTTP error (4xx status), the periodic sync should be unregistered.
This is also possible today but the developer needs to encode this. The idea is to let the web app sync whatever resources they like periodically. To that end, the browser simply sends periodicSync events to the service worker and the service Worker in turn sends any fetch requests to their server. The browser isn't initiating the fetches (giving more flexibility to the website to execute whichever fetches they like), and doesn't look at the responses from them either. The service worker can thus look for a 4xx response and call 'unregister'.

Let me know if you think the browser should do things differently.
@KenjiBaheux FYI.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/367#issuecomment-638304491

Received on Wednesday, 3 June 2020 16:21:10 UTC