Re: [w3c/ServiceWorker] consider adding a note that response body may be re-buffered in browser (#1573)

Hey there,
I am the reporter for https://bugs.chromium.org/p/chromium/issues/detail?id=1188114

I was wondering if [Transferable Streams](https://github.com/whatwg/streams/blob/main/transferable-streams-explainer.md) ([chrome support](https://chromestatus.com/feature/5298733486964736)) could allow service workers to pass data directly to the target frame without getting re-buffered with a fixed size.

Passing a stream from a service worker to a webpage via transferable streams(using `postMessage`) actually do work as expected and send the entire, full sized buffer (in my test case, `Uint8Array(1000000)`).

So since the tech is already there(at least for chrome), i was wondering if it'd just be possible to use it for fetch's respondWith and get the correct behavior.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1573#issuecomment-1025056096
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/issues/1573/1025056096@github.com>

Received on Sunday, 30 January 2022 02:54:19 UTC