polyfill-prototype-1
polyfill-prototype-1 copied to clipboard
A question about decoding while downloading
Decode while downloading (using HTTP Range requests or splitting into separate files)
Since WebAssembly is targeted at newer browsers, how about you guys use the new fetch
API for this, you would be able to use the data as it's received and all that in a single http request, no more ranges.
Link: MDN fetch
And exclude Edge? No way ;)
Does the Fetch API provide the ability to stream in data before the Streams API has landed (which I didn't think was anywhere yet)?
Regardless, Fetch is pretty new and the polyfill would want to support as many browsers as it could so, realistically, it would use feature detection and use the best thing it could, falling back on XHR. E.g., IE (Edge still?) has ms-stream and Firefox has moz-chunk-arraybuffer.
I should also note that this repo is not being actively worked on. Alon is working on a high-performance polyfill based on a similar strategy in Binaryen, though that I think will be evolved into something industrial strength (where these streaming techniques could help).