alt.hn

6/29/2026 at 12:48:17 AM

You might not need a service worker

https://www.jayfreestone.com/writing/you-might-not-need-a-service-worker/

by Fudgel

6/29/2026 at 5:02:19 AM

While working on a small atproto OAuth client I discovered a neat service worker pattern that I don't think I've ever seen someone write about. The page makes normal fetch requests, and the service worker adds the authorization header and handles token refreshes/dpop retries/etc under the hood. https://tangled.org/jakelazaroff.com/atsw

by jakelazaroff

6/29/2026 at 5:20:17 AM

> I’d argue that this is more of a question of ‘do I need offline support?’ For Slack, sure, but for many apps, probably not.

I like offline support. I enjoy it when an app I use supports it. And I want to add support for it in my own app. But, it is a hard problem. And to the best of my knowledge there is no framework or library that that solves the hard problems for you.

by cheema33

6/29/2026 at 1:55:42 PM

I can appreciate the author's perspective, but in my experience the magic of bringing the online world offline gave our product (https://ww.cardcluster.com/install - duelists, give it a try!) a significant amount of stickiness compared to other similar services. But it should be noted that we built our product with service workers in mind from the beginning; trying to retrofit service workers into a mature application with paying customers and all sounds extremely tricky.

by Shalomboy

6/29/2026 at 2:55:43 PM

I got a dns not resolved error.

by adithyassekhar

6/29/2026 at 4:05:37 PM

the offline mode is literally offline :p

by addedGone