5 ms·
I always get all stoked on service workers until I remember that half my users are on safari. Then I get bummed.
by thrownblown 9y ago
I always get all stoked on service workers until I remember that half my users are on safari. Then I get bummed.
- akulbe 9y agoWhat's the difference with Safari? (not a JS dev, so this is not familiar territory)
- gumoro 9y agoNot implemented. "Under consideration". https://webkit.org/status/#specification-service-workers https://webkit.org/status/#specification-service-workers
- csharpminor 9y agoIt's not just a safari problem, last I checked Chrome on iOS also does not support service workers, so you're just helping Android users. Apple has a vested interest in pushing users towards their walled garden for apps, while Google and Mozilla are trying to bring app-like experiences to the browser. There are hints of Safari supporting serviceworkers but I'm not holding my breath. Highly recommend Alex Russel's talk on progressive web apps as background: https://m.youtube.com/watch?v=x7cfLDFVyHo https://m.youtube.com/watch?v=x7cfLDFVyHo I happen to agree that offline-readiness (via service workers) is at the core of whether the open web will continue to be a relevant medium.
- BHSPitMonkey 9y ago> you're just helping Android users And desktop users of Chrome, Firefox, and soon Edge (which has support implemented behind a flag).
- csharpminor 9y agoWhile true, the most compelling use-case for serviceworkers is still on mobile. Serviceworkers solve the problem of intermittent connectivity. They can patch the gap when a user drops a connection for less than a few minutes (e.g. when a user is mobile). Laptops and desktops still benefit, but less so because generally if you sit down to use one of those devices in an area of poor connectivity, you're going to run out of things you can do with your serviceworker's cached content pretty quickly. If you're developing a serviceworker, the improved experience will be most felt by mobile users.
- azernik 9y agoThat depends on the application. Some applications will run out of stuff to do after a few minutes offline, but others (especially where individual tasks are pretty independent, like Google Docs) can still be very useful for long periods, and can benefit from increased control of caching strategies.
- gramstrong 9y agoUnfortunately for Edge/Windows, in order to make the app installable it will have to be registered in the Windows Store. A small nuisance, and maybe a compromise that Safari/OSX could move towards, but still a pointless exercise that misses the point of PWAs.
- geofft 9y agoThe Guardian has an experimental iOS app that polyfills the Service Worker API. The way you'd use it is, roughly, change the INITIAL_URL variable to your home page, change the name / icon / etc. of the app, then release it on the App Store as an actual app. https://github.com/gdnmobilelab/hybrid https://github.com/gdnmobilelab/hybrid If you have an actual iOS app already, then this is of course worse, but if you have something that works nicely as a webpage on Android with ServiceWorkers and you want iOS users to have some option at all, this is probably worth playing with.
- deleted 9y ago[deleted]
- elithrar 9y ago> last I checked Chrome on iOS also does not support service workers, so you're just helping Android users. All browsers on iOS are wrappers around WKWebView (Safari, for the most part). You can’t release a browser app for iOS that doesn’t use this.
- callahad 9y agoI wouldn't let that stop you: adding a service work won't in any way degrade the experience of Safari users. When used for caching, it's pure progressive enhancement. Sure, some browsers will have a more robust experience in adverse network conditions, but the experience once a page has loaded will be identical. It's also difficult to accidentally make the worker a hard dependency of a site, since even supported browsers will load the site without the worker on first visit.
- MuffinFlavored 9y agoI might be dumb but can't you kind of polyfill this behavior by making your SPA cache itself on load and response to everything as events, like shown in the repo linked in this article?
- tuxracer 9y ago> I always get all stoked about creating an iOS app until I remember that half my users are on android. Then I get bummed. But seriously it is a bummer Safari doesn't support service workers yet. It's possible higher adoption would put more pressure on Apple to add support. In the meantime it can be a great enhancement where it is supported.