WICG / background-sync

A design and spec for ServiceWorker-based background synchronization
https://wicg.github.io/background-sync/spec/
Apache License 2.0
640 stars 83 forks source link

SHOULD in a note and enabled by default #152

Open annevk opened 5 years ago

annevk commented 5 years ago

https://wicg.github.io/BackgroundSync/spec/#permission has a requirement in a note. That doesn't work.

As per #107 and #37 it's also not clear to me what "enabled by default" means, as our (Mozilla's) best plan to date to avoid surprises is to prompt in certain cases.

jakearchibald commented 5 years ago

The model here is supposed to be similar to similar to sendBeacon(), in that it's used whether the user is offline or not, but it will handle the offline case. Although I recognise that it can do more than sendBeacon().

The assumption was, if the user visited the site as a top-level origin, they'd be happy with a one-off sync unless they'd expressed otherwise.

I agree this is not well presented in the spec, and of course browser should be free to behave differently.

annevk commented 5 years ago

Yeah, we want to prompt when offline, as the user might not want to reveal their destination (if any). And as per #37 we might want to prompt or auto-deny under certain network/battery conditions.

martinthomson commented 5 years ago

I might have a different view on that. I might want to just have it not work in that case, because annoying people about things that shouldn't bother them is inconsiderate.

annevk commented 5 years ago

Well, having to remember to navigate to the site once online to get your offline work in the cloud is also not ideal. "Would you like X to know when you're next online so they can save your work?" does not seem overly obtrusive to me.