Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Define the lifetime of a blob URL created inside a service worker #688
Right now in Gecko at least we tie the lifetime of such URLs to the Worker or SharedWorker that created them, but doing the same (as in, invalidating the blob URL when the service worker goes away) seems wrong, since that can happen at any time at UA's discretion.
How should we handle this?
One option that comes to my mind right now is keeping those URLs valid until the service worker that registered them is unregistered.
I think Gecko's current behaviour is correct. Yes, it may get GC'd when the SW closes, but same with variables. If you want a long term way to store a response, the caches api is the way to go right?
Tieing it to registration feels wrong as it would need to survive browser shut down.
What is the current behaviour breaking? I'm wondering if a way to access items in the cache api by url may be a better solution.
referenced this issue
Feb 2, 2016
Blink tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=604951
I filed w3c/media-source#67 since MediaSource has createObjectURL as well.
MediaStream had it as well at some point but it's been removed from the spec.