WebWeWant / webwewant.fyi

If you build websites, you inevitably run into problems. Maybe there’s no way to achieve an aspect of your design using CSS. Or maybe there’s a device feature you really wish you could tap into using JavaScript. Or perhaps the in-browser DevTools don’t give you a key insight you need to do your job. We want to hear about it!
https://webwewant.fyi
MIT License
76 stars 23 forks source link

Service Workers always available #243

Open aarongustafson opened 3 years ago

aarongustafson commented 3 years ago

title: Service Workers always available date: 2020-12-07T22:47:54.285Z submitter: PRIVATE number: 5fceb11a443ce9228d1f3aa2 tags: [ ] discussion: https://github.com/WebWeWant/webwewant.fyi/discussions/ status: [ discussing || in-progress || complete ] related:

The Service Worker API is regularly unavailable in cases where a user refreshes a page, or privacy modes are enabled.

Service Workers have uses beyond caching:

We can't rely on any of these things today because Service Workers are often simply unavailable.

Rather than disabling the Service Worker in privacy mode, or on refresh, it makes more sense to disable its storage. That way, all of these other alternative use cases can still work.

Brad Isbell brad@audiopump.co


If posted, this will appear at https://webwewant.fyi/wants/5fceb11a443ce9228d1f3aa2/

guest271314 commented 3 years ago

There are ways of keeping ServiceWorkers alive https://plnkr.co/edit/4AWjlY2wFbgiqbZQ. I would suggest using WebTransport.

aarongustafson commented 3 years ago

@jungkees @jakearchibald Thoughts on this?