16
11

Why are we not using Service Workers?

9d 3h ago by programming.dev/u/codeinabox in webdev@programming.dev from neciudan.dev

Because they add another layer that can make something more complex.

The better question is: how can we make something less complex?

While it’s not my preference, there’s a huge benefit to a basic LAMP stack with no JavaScript.

The alternative to a less complex web is we will have more native applications. And honestly, I do not prefer that

That doesn’t need to be the case. Yes, there is a place for a “web app” with advanced tech, but most of the web isn’t a web app.

And, regarding native apps, that’s why there are downloadable web apps made in Wails, Tauri, or that disgusting Electron.

I assume you are one of those people that wants the web to go back to the 2000 era. Where JS is not as wide spread and multimedia is expensive to load. That's why I assume if you want the web to be simpler you advocate for removing many of the current web standards/API. I meet too many people like that hence my immediate assumption

I am not who you think I am. I also never said half of that. You seem like the type who likes to gaslight and imagine conversations.

Naah, I do not have imaginary conversation. Those are what many people I speak on some discord server actually say when they talk about the web being too complex. While they used discord. And many people at that. That's why I jump to the assumptions, my bad then.

JS was a mistake and the web was doing just fine without it /s

More people needs to know about Vite PWA project. It will generate the service worker for you and still provide the escape hatch if you ever need to write it your own too!

Oh I've set up a PWA with that before! It really is wonderful to use! (although my service workers are only an image caching layer for now as I need my data to stay fairly in sync with my db)

The caching and boot time scenario is very compelling, for teams who have an actual web APP to deploy, not just a web SITE, but... why were they not just leveraging the caching capabilities the browser ALREADY has?

Like, genuine question: what caching capabilities does a Service Worker that the browser doesn't already do?

Offline cache becomes possible with PWA

Edit to give concrete example: Mozilla MDN docs read later/read while offline

I was wrong. It was not mozilla MDN. But I do remember an offline cache docs site