Live data from Hacker News

Service Workers

frontendian.co

51–60 of 68 posts

Re: Service Workers

#51

Earlier quoted context omitted.

Definitely. I’d hate to have it download all my mail on my laptop or my phone. We have yet to particularly consider the UI for controlling it, but I fully expect that anything in the way of synchronisation rather than simple caching of what we’re already fetching (and only limited amounts of that—there’s already an LRU GC on the cache) will require manual configuration, probably with options like “sync the inbox” or…

I can't imagine not downloading all mail, why wouldn't you want a local backup? Space is cheap.

If you want a local backup of all your mail, using a web app like ours, even if it supports fetching it all, is not a good idea, unless it satisfies both of these criteria:

(a) it should support fully offline and session-agnostic functionality. We’re very unlikely to ever go this way on fastmail.com, because it’s just not going to be useful to almost anyone, and is more complex and easily leads to confusion. Instead, the data will be tied to your session, so that if you log out, or your session is permitted to expire, or you close your account, then the data will all promptly be deleted when you next go online.

(b) it has a way to export it again. Theoretically with JMAP we could actually do that, but even if we did implement it (and I doubt we ever will), it lacks the portability of other formats like mbox or PST.

Taking both of these points together, I say that an email service provider’s app’s sync should not be considered suitable for a backup. For convenient offline access, perhaps, but not for a backup.

Re: Service Workers

#52

Note to Author: Irregardless is not a word.

Yes, it is. https://www.merriam-webster.com/dictionary/irregardless

Webster’s is a descriptive dictionary, which will include nonstandard words so that it can _describe_ them, and provide guidance on what should be used instead. Just like in that link - it suggests the use of “regardless”

Re: Service Workers

#53
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.

I suppose that depends on the type of browser you use.

Re: Service Workers

#54

Earlier quoted context omitted.

I'm pretty sure that everyone who ever used some sort of messaging application thinks that push notifications are a good idea.

Nobody wanted their "messaging application" to run in a web browser before Google. AIM, ICQ, IRC, and Yahoo Messenger all used local clients.

but people do want their messaging application to run in a browser now.

People don't want something until it happens and they see it and say hey that's what I want, unless you are going off the assumption that people are sheeple and can be made to want messaging applications in the browser because they have been told to want it somehow.

Re: Service Workers

#55
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 can't maintain a persistent connection. Without an active tab it is shut down after 30 seconds or so. It can receive events via the Push API, which is what you're seeing. But if you refuse notification permissions the site cannot use the Push API. I'm actually not sure how it works when you block notifications after having given permission - it's a requirement that you show a notification in response to a push, so if you're blocked, I'm not sure how the browser registers it.

More broadly, I agree that it is strange you can opt into the Push API without a permission prompt. I wish it weren't the case, but I do think it would be confusing to users to request separate push and notification permissions - most consider them to be synonymous, even if they aren't.

Re: Service Workers

#56

Earlier quoted context omitted.

I'm pretty sure that everyone who ever used some sort of messaging application thinks that push notifications are a good idea.

Nobody wanted their "messaging application" to run in a web browser before Google. AIM, ICQ, IRC, and Yahoo Messenger all used local clients.

No actual user cares how their messaging application is made. If it's a progressive webapp or a native app, and the actual experience can be the same, then it really doesn't matter.

> AIM, ICQ, IRC, and Yahoo Messenger all used local clients.

A webapp with a service worker is a local client. And a lot of people use Whatsapp Web, or Facebook Messenger's web site. I know I do.

Re: Service Workers

#58
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…

> every single time I encounter service workers they make things worse

I'd wager you encounter more service workers than you think, but you don't notice them when they work correctly. They are designed to be invisible in the majority of cases, so of course you only notice them when something goes wrong.

Re: Service Workers

#59

Earlier quoted context omitted.

Nobody wanted their "messaging application" to run in a web browser before Google. AIM, ICQ, IRC, and Yahoo Messenger all used local clients.

but people do want their messaging application to run in a browser now. People don't want something until it happens and they see it and say hey that's what I want, unless you are going off the assumption that people are sheeple and can be made to want messaging applications in the browser because they have been told to want it somehow.

Really? Have they been given an alternative? Not an electron app, a real desktop alternative, that syncs with the mobile native client and gives an in-desktop experience.

Nobody did that, ever. It's simpler and cheaper to ship an in-browser solution, so everyone does that, that's all.

Re: Service Workers

#60

Earlier quoted context omitted.

The malware angle is basically service-worker-powered cache poisoning: if you can get the server to serve your code once, users can get a service worker installed, and intercept resource requests under that path. It’s limited in practical value because you have to be able to serve a full JS file as the service worker, rather than just injecting a snippet of JS as the most common technique is, but it is a genuine atta…

Service workers automatically reload after 24 hours, regardless of caching headers (though I believe they’ll respect a 304). I believe this was done partially to limit the duration of such a compromise.

I don't want to be compromised at all and it seems like a great way keep it that way is to force web pages to live in you know pages which I can close and know they aren't effecting my browser.

It also breaks my mental model of how the browser works in a way that will be incomprehensible to users.

Instead of my computer is acting funny I need to reboot we will have my browser is acting funny I need to restart it or we can combine the 2.

My browser is acting funny lets power cycle again. Coming soon to a windows PC near you.

Post reply on HN