On Wed, 21 Aug 2013, Robert Kroeger wrote:
>
> FWIW: the problem that prompted me finding this API was wanting to
> answer the following question: how does one implement a drive-by-web
> alarm clock webapp for a mobile web browser.
I don't think you do, currently.
Is that the only use case? I think I would be ok in saying that this is an
app that you have to do natively if it's the only use case (in particular
since it would require other big permissions, like waking up over a lock
screen, going full-screen, overriding the system volume control, etc).
> Speaking of background-wakeup: why is background-wakeup very scary until
> combined with other scary permissions (e.g. microphone).
Because it's a spam vector, a DOS risk, and a griefing risk.
Spam: A site can just register itself to come up every 10 minutes and pop
up another ad or whatever ("Virus detected! Pay us for a fix! You data is
at risk until you pay us!").
DOS: A site can register itself to reopen repeatedly, costing CPU.
Griefing: A site can register itself for years later, at which point it'll
pop up and the user will have _absolutely no idea_ what happened.
The Web security model right now somewhat depends on the invariant that if
you go to a site that you don't like, you can just close it and that's it,
you're done with it. If now the site can come back on its own, it's not
clear how you would close it. (Having two close buttons, or some such, is
not simple enough for many users to understand, IMHO. Open vs Closed is
easy to understand. Open vs Closed vs Closed-but-could-reopen-maybe is a
much more complicated model to reason about, as a user.)
> Navigating to a site automatically gives the site permission to (ab)use
> the computational resource on my machine provided the JS is reasonably
> well behaved (like in a worker).
Only until you close the tab, though. Then, it's _gone_.
On Wed, 21 Aug 2013, Tab Atkins Jr. wrote:
>
> Tangential: "alarm clock" is a pretty weak use-case. A much stronger
> one is just pointing to Google Calendar's existing notifications - I
> currently have to remember to keep Calendar open somewhere if I want any
> notifications (and I definitely want them). This would prevent me from
> mistakenly closing the tab and missing something.
Yeah, I think a more interesting model would be a subscription-style thing
where you can allow a site to push notifications (including scheduled
ones) to your device (or, for setups like Chrome-logged-in users, to a
user's account, all registered devices). It wouldn't bring up the site, it
would bring up a system notification, with the same "disable this domain's
permissions for notifications" as a Web Notification notification.
(There's also been talk of pushing down updates to caches or IndexDB.)
This would need a new spec or new feature in Web Notifications or similar.
I don't think it'd be based on the spec we're discussing here.