DEV Community 👩‍💻👨‍💻

Sammy Israwi
Sammy Israwi

Posted on

Do you use Service Workers in production? How has your experience been like?

If you have used Service Workers in production, I'd like to hear about it!

  • How did you realize you needed them?

  • How was your experience setting it up, and maintaining it?

  • Results? Demos?

Thank you all!

Oldest comments (7)

xeewi profile image
Guillaume Gautier

I actually trying to use it on a ionic app, specially for the offline mode. It's simply not working for me lol.
Working perfectly on the navigator, but when the app is running on device that not working anymore

likebrain profile image
Ricardo Rivera

Hey, you must get the pwa from a secured Location... in Ionic Cordova eg. file:// are not ssl secured. Use a remote-Location like in Cordova + Cordova-whithlist-plugin and serviceworker run in Cordova... in some cases you need to ad crosswalk also...

send with phone

pungiish profile image

Can't figure out how to con figure it for both aot build and then for production where the folder doesn't have the aot suffix..

callistom profile image

Used it for a PWA, worked perfectly for caching certain things. Have not yet tried the offline capabilities.

sammyisa profile image
Sammy Israwi Author

Why not? Do you not need it? Or is the effort not worth it in your case?

callistom profile image

Not really needed in my case but maybe for the next PWA or some future release.

qm3ster profile image
Mihail Malo

Even with dirt-cheap CDNs it seems like the respectable thing to do.
Especially for mobile devices. No CDN will solve poor last-mile connectivity, or save users data.

The main trap people fall into, in my experience, is thinking of it as "HTTP cache++", and just applying it to unstructured sites.

If you want a quality offline-first experience, you need to approach your product, from the get go, as an application. (Which just happens to be written with web technologies).

It is tremendously easier to add SSR to an offline-first, well-structured application using best practices than it is to make even a subset of your SSR-first application provide a usable offline experience.

Visualizing Promises and Async/Await 🤯

async await

☝️ Check out this all-time classic DEV post