Hacker News new | ask | show | jobs
by EGreg 3301 days ago
Service workers were designed to only work during events which you opted into. Either because you loaded the site which is now making requests, or because you OPTED IN to receive notifications.

Think about it this way... why do you have to download an entire app just to use a site? Don't like the notifications? Turn the off.

1 comments

Yes because ordinary users never, ever opt in to things they shouldn't. And because of that one opt-in mistake suddenly they have invisible service workers mining Bitcoins which they could never learn about since the discovery mechanism for service workers is currently non-existent.

Again, the concept of background tasks isn't necessarily a bad thing. But it needs to be locked down to specific use cases not a free for all allowing arbitrary JS to be executed.

So limit the amount of CPU/bw/etc. they can use, just like mobile platforms do for background apps?
Installing an app is a higher bar than tapping the "get out of my way" button on a modal dialog that some website just shoved in your face.
Oh good. It can only burn 10% of my battery and bandwidth to make someone else rich. That's fair.