demo · v140
Blob Controller
A SharedWorker booted from a blob URL now inherits the parent page's service worker. Fetches the worker makes go through the SW just like the page's. The probe below boots a blob worker and round-trips a fetch through it.
SharedWorker not available
Try Chrome 140+ on Android or any current desktop Chromium.
SW unknown
controller unknown
// Pre-140: a SharedWorker from a blob URL ran in an
// uncontrolled context. Network fetches inside
// the worker never hit the SW.
//
// 140+: blob workers inherit the controller of the
// starter (the page), so /api/* etc. get
// intercepted as expected.
const w = new SharedWorker(blobUrl);
// w now sees navigator.serviceWorker.controller
see also
- SharedWorker blob inherits controller — feature index
- Workers spec