At the moment SW proxy does forward ArrayBuffer for request / response bodies. Which seems to work in use cases currently being proved, however it won't be able to handle things like video streams etc...
Ideally ReadeableStream would have being made transferable, but sadly they are not (, at least yet). In order to support this we need to polyfill that via MessagePort API. We could either create one per request / responce and send it over with response or alternatively multiplex via same MessagePort. Former has benefit of not needing to keep track of request IDs, however later might have non-negligible impact on memory use.
At the moment SW proxy does forward
ArrayBuffer
for request / response bodies. Which seems to work in use cases currently being proved, however it won't be able to handle things like video streams etc...Ideally
ReadeableStream
would have being made transferable, but sadly they are not (, at least yet). In order to support this we need to polyfill that viaMessagePort
API. We could either create one per request / responce and send it over with response or alternatively multiplex via sameMessagePort
. Former has benefit of not needing to keep track of request IDs, however later might have non-negligible impact on memory use.