Developers can now construct their own ReadableStream instances, and use one as a body for constructing a Response object. It enables streaming composed body data from a ServiceWorker to a page controlled by it.
Demo
Documentation
Specification
Status in Chromium
Enabled by default (tracking bug) in:
- Chrome for desktop release 52
- Chrome for Android release 52
- Android WebView release 52
Consensus & Standardization
After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.
- In development
- No signal
- In development
- Strongly positive
Owners
Search tags
streams, fetch, readable streams, streaming,Last updated on 2020-11-09
Comments
Since M43, readable streams can be obtained (only) from the body attribute of the Response. Developers can now construct their own ReadableStream instances (http://crbug.com/503491), and use one for constructing a Response and serve it from a ServiceWorker. This feature had been available behind a flag since M49. A *Request* cannot yet be constructed with a ReadableStream as a body (for streaming uploads).