Live data from Hacker News

Service Workers

frontendian.co

11–20 of 68 posts

Re: Service Workers

#11
post #7

Firefox: about:config dom.serviceWorkers.enabled;false Why: They bite. The generic idea may even be reasonable (offline working web app), but every single time I encounter service workers they make things worse. If you load a React frontend, it'll, by default, deploy a service worker. Good luck trying to load anything non-react from that resource/server. I never asked for a web app to work in the background once I cl…

> If you load a React frontend, it'll, by default, deploy a service worker. What? > That is how the web works. The web 'experience' has stopped being about fetching static documents in a request/response fashion long ago. Consumers demand rich apps and interactivity, and it appears they're having it their way.

> What?

https://github.com/facebook/create-react-app/issues/2398

> Consumers demand rich apps and interactivity

They really don't. That's an assumption without data.

EDIT: see gov.uk. It works quite well without being fancy.

Re: Service Workers

#12
post #7

Firefox: about:config dom.serviceWorkers.enabled;false Why: They bite. The generic idea may even be reasonable (offline working web app), but every single time I encounter service workers they make things worse. If you load a React frontend, it'll, by default, deploy a service worker. Good luck trying to load anything non-react from that resource/server. I never asked for a web app to work in the background once I cl…

> If you load a React frontend, it'll, by default, deploy a service worker. What? > That is how the web works. The web 'experience' has stopped being about fetching static documents in a request/response fashion long ago. Consumers demand rich apps and interactivity, and it appears they're having it their way.

> Consumers demand rich apps and interactivity, and it appears they're having it their way.

no consumer ever demanded the web to be like an app. this is marketing baloney crap. stop treating humans browsing the web as targets for advertisement and consumerism.

Re: Service Workers

#13
post #11

Earlier quoted context omitted.

> If you load a React frontend, it'll, by default, deploy a service worker. What? > That is how the web works. The web 'experience' has stopped being about fetching static documents in a request/response fashion long ago. Consumers demand rich apps and interactivity, and it appears they're having it their way.

> What? https://github.com/facebook/create-react-app/issues/2398 > Consumers demand rich apps and interactivity They really don't. That's an assumption without data. EDIT: see gov.uk. It works quite well without being fancy.

> https://github.com/facebook/create-react-app/issues/2398

Equating 'create-react-app' package with React is silly. By that logic, I can wrap $library_of_your_choice in scaffolding and then blame it for the bloat I've chosen to add.

> EDIT: see gov.uk. It works quite well without being fancy.

We're at an impasse, since you countered my 'assumption without data' with your 'one-off anecdotal evidence'

Re: Service Workers

#14
post #10
post #7

Firefox: about:config dom.serviceWorkers.enabled;false Why: They bite. The generic idea may even be reasonable (offline working web app), but every single time I encounter service workers they make things worse. If you load a React frontend, it'll, by default, deploy a service worker. Good luck trying to load anything non-react from that resource/server. I never asked for a web app to work in the background once I cl…

> That is how the web works. good luck trying to convince google of that. they are shaping the web just the way they want it. push notifications? nobody ever except the marketing apartment thought that was a good idea to add to anything. if we try making everything on the web like mobile apps we're gonna get garbage features like this and false expectations on what the web should be like.

Well, i was looking foreward to push-notifications on the web and used them for non-marketing related purposes.

EDIT: I also used Service-Workers in the same project to provide offline functionality :) It worked great, I was suprised how good it worked!

Re: Service Workers

#15
post #7

Firefox: about:config dom.serviceWorkers.enabled;false Why: They bite. The generic idea may even be reasonable (offline working web app), but every single time I encounter service workers they make things worse. If you load a React frontend, it'll, by default, deploy a service worker. Good luck trying to load anything non-react from that resource/server. I never asked for a web app to work in the background once I cl…

> If you load a React frontend, it'll, by default, deploy a service worker.

I think you mean that create-react-app is doing this by default, and that it might be a surprise and cause of problems for the developer. Which is also the reason why they're removing that by default from create-react-app v2.

> That is how the web works.

That's not really an argument, in that it also could've been used as an argument against the introduction of inline images, CSS, or anything added to the web after its first publication. It doesn't really matter how the web works today; what's relevant is how we want the web to work.

Re: Service Workers

#16
post #12

Earlier quoted context omitted.

> If you load a React frontend, it'll, by default, deploy a service worker. What? > That is how the web works. The web 'experience' has stopped being about fetching static documents in a request/response fashion long ago. Consumers demand rich apps and interactivity, and it appears they're having it their way.

> Consumers demand rich apps and interactivity, and it appears they're having it their way. no consumer ever demanded the web to be like an app. this is marketing baloney crap. stop treating humans browsing the web as targets for advertisement and consumerism.

You are conflating what you wish were true with reality.

For-profit companies typically build toward what they believe is in-demand and will be well-received by consumers. They perform market analysis to reinforce their intuition. Sometimes they get it right and their stock goes up.

There isn't some elaborate plot on the part of Google, nor are 'they' purposely making something 'no consumer ever demanded.' When they do this, the endeavor fails and we call it a flop.

Re: Service Workers

#17
post #5

I like service workers, but I don't like the lack of control I have. For example, I want Messenger to send me notifications if I have the tab open, but I don't want the service worker to maintain a persistent connection and send me notifications with the tab closed. Unfortunately, I am not able to block service workers. My only option is to block notifications entirely, which doesn't even stop the service worker.

The service worker does not maintain a persistent connection. Some websites/pwa's allow you to configure that.

Re: Service Workers

#18
post #8
post #3

Great write up. I’ve been exploring SWs recently to help with downloading and caching data in the background for faster UI. Question, I’d like to avoid doing large downloads or possibly cap the transfer rate to avoid any potential jank. Is there a best practice or is it possible to monitor the current browser interaction to determine how strategically best to pull data with a SW? Depending on what a user chooses to c…

May I ask the justification to download 1-10MB JSON on the user's system without the user being aware?

You also cache regular web resources like images. It is for the user's benefit since next visit to the site can be faster.

Re: Service Workers

#19
post #12

Earlier quoted context omitted.

> Consumers demand rich apps and interactivity, and it appears they're having it their way. no consumer ever demanded the web to be like an app. this is marketing baloney crap. stop treating humans browsing the web as targets for advertisement and consumerism.

You are conflating what you wish were true with reality. For-profit companies typically build toward what they believe is in-demand and will be well-received by consumers. They perform market analysis to reinforce their intuition. Sometimes they get it right and their stock goes up. There isn't some elaborate plot on the part of Google, nor are 'they' purposely making something 'no consumer ever demanded.' When they…

> what they believe is in-demand and will be well-received by consumers

They never show an actually alternative version. A/B or bandit testing doesn't cover a comparison between, say, a nicely designed, very fast, non-tracking, but less interactive version, or a slow, but full-fledged "app".

There used to be mobile versions accessible from desktop (twitter, facebook, etc), but not any more without faking the user agent. Those are significantly lighter, than desktop versions, but there is no way to actually compare the two for the generic public, and companies don't seem to be brave enough to really dig into these questions.

This is the comparison I miss.

Hence my wording: assumption.

Re: Service Workers

#20
post #8

Earlier quoted context omitted.

May I ask the justification to download 1-10MB JSON on the user's system without the user being aware?

You also cache regular web resources like images. It is for the user's benefit since next visit to the site can be faster.

You misunderstand. Service worker traffic is invisible, unlike loading an image and generally speaking can't be governed, unlike visible elements.

Loading 1-10MB JSON might drain a significant portion of mobile data. It could take a long time, meaning it may need to re-start it a couple of times, due to, say, a flaky 3G connection.

I'm curious on the why - unless this is an announced feature, I don't think this should be an automatic process and should only be done on user demand explicitly.

Post reply on HN