News for hackers. Stuff that matters.
Re:JSC loves ES6 by threeseed on Monday June 05, 2017 @08:27PM (#14493683)
Service workers are an anathema to everything Apple is trying to achieve with Safari and I would be shocked if it ever gets included. Their focus is on improving battery life, having a great user experience and maintaining a high level of privacy and security. Service workers are awful for all three. For example look at what you have to do to see running service workers:

Developer Tools > Application > Service Workers

chrome://inspect/#service-workers

If there was a rogue web site launching service workers to do something nefarious how would I know diagnose what's happening ? How would my grandmother ? Where is the transparency the web is supposed to provide ?

Re:JSC loves ES6 by rictic on Monday June 05, 2017 @11:07PM (#14494420)
This is a misconception. Service workers don't sit in the background consuming resources and performing arbitrary tasks. They respond to events, typically to intermediate requests while a user is using a site.

The service worker spec was carefully and deliberately designed to give the browser, not the site, control over resource consumption. The browser is allowed to stop any service worker at almost any time. See https://github.com/w3c/ServiceWorker/blob/master/implementat...

Re:JSC loves ES6 by pfooti on Monday June 05, 2017 @09:20PM (#14493962)
Something here about babies and bathwater. Service workers are pretty limited in what they can do.

Is there UX work to be done? Sure. But the fundamental problem is that they fill a need that is not met at all by Apple, and not even in a silly "use metal instead of vulkan because reasons" kind of NIH but we'll support some other similar standard fashion, but in a "nope" way.

So, kudos for the speedy es6. I'm still not going to tell people to use safari on macos, and I'm still going to build crazy DIY caches for safari on iOS because I can't do stuff with service workers in a standardized way.

Re:JSC loves ES6 by untog on Monday June 05, 2017 @11:04PM (#14494398)
> If there was a rogue web site launching service workers to do something nefarious how would I know diagnose what's happening ?

What exactly are you supposing a service worker would be doing? They can't do huge downloads (the worker is shut down when there are no pages using it and it can only be reactivated by another browsing session or push message), can't receive push messages without showing a notification... there really is very little a service worker can do nefariously.

It can, however, help improve battery life by allowing you to better control the offline experience, and not needlessly activate cell radios.

Re:JSC loves ES6 by Sacho on Tuesday June 06, 2017 @05:26AM (#14495875)
> If there was a rogue web site launching service workers to do something nefarious how would I know diagnose what's happening ? How would my grandmother ? Where is the transparency the web is supposed to provide ?

How does your grandmother check if the website she visits isn't doing something nefarious without service workers? Does she run the CPU profiler to see all the JS being executed? That's pretty badass, I wish my grandmother was this cool.