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!
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:
Adapting stream protocols (i.e. SHOUTcast/Icecast ICY) to work in standard HTMLMediaElements. (MediaSource Extensions do not work here.)
Streaming data for image elements (and others) from alternative sources (Bluetooth, MIDI, WebSocket, wherever.)
Auto-resuming/graceful handling of uploads.
Streaming dynamically rendered "downloads".
API abstraction (fetch('midi.local/ch1/patch'), and maybe the Service Worker goes and does the actual MIDI work)
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.
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:
title: url: type: [ article || explainer || draft || spec || note || discussion ]
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:
fetch('midi.local/ch1/patch')
, and maybe the Service Worker goes and does the actual MIDI work)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/