From 4abb1e4e3a45c0a251708b7915e30456a818dba9 Mon Sep 17 00:00:00 2001 From: Mugdha Lakhani Date: Wed, 11 Sep 2019 14:13:52 +0100 Subject: [PATCH] Data Saver Mode + permission Add recommendation to respect data saver mode and battery saver modes and add a note on 'periodic-background-sync' permission. --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 371cc90..72d0362 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,8 @@ run for a site if the user isn't currently visiting the site. It can also limit worker is allowed to be awake for running periodic tasks. An additional `periodic-background-sync` permission will be exposed through the Permissions API to -allow developers to query whether the API can be used. +allow developers to query whether the API can be used. The user or the user agent on behalf of the +user must set this permission to 'granted' before the website can use this capability. # Design decisions @@ -156,8 +157,12 @@ The interfaces mimic regular Background Sync, but substitute `navigator.sync` wi ## Power and Network conditions The original explainer allowed the website to specify power and network conditions under which the periodic task should be run. This proposal leaves those decisions to the browser implementation, -because we believe the browser is better positioned to make those choices for the user. This also -makes for a simpler interface for developers. +because we believe the browser is better positioned to make those choices for the user. +This also makes for a simpler interface for developers. + +When the device is in either battery or data saving mode, the `periodicsync` event SHOULD not be +fired. This would also cover some situations where the browser incorrectly detects whether the +device is connected to an unmetered connection. ## Timing of periodic sync tasks The API allows the developer to specify a `minInterval` for each periodic sync task. The browser is