yutakahirano / fetch-with-streams

Fetch API integrated with Streams.
66 stars 8 forks source link

Representing Fetch' body concept in streams, Response side #40

Closed yutakahirano closed 8 years ago

yutakahirano commented 9 years ago

Branched from #36. This is easier than the Request side counterpart (#41)

gwicke commented 9 years ago

The ability to stream composite responses from service workers would enable client-side page composition without hurting first-paint latency on slow connections.

yutakahirano commented 9 years ago

Please note that this is an internal issue for the spec (a.k.a. refactoring effort).

tyoshino commented 9 years ago

@gwicke Did you mean "streaming bytes composed in SW to the controlled page in response to fetch event" by "stream composite response"? Just wanna confirm.

gwicke commented 9 years ago

@yutakahirano, understood. I just wanted to provide feedback that basic enqueue functionality would already be very appealing for SW users. If there is an opportunity to release a small part of the spec including this for implementation, then that could be very useful to users.

@tyoshino: Yes, exactly. See https://phabricator.wikimedia.org/T106099 for our (Wikimedia Foundation / Wikipedia) use case.

tyoshino commented 8 years ago

@gwicke Thanks for the reply and sorry for delay. We're trying to work on it with higher priority. We do understand composability like this would be important feature for utilization of SW.

yutakahirano commented 8 years ago

merged https://github.com/yutakahirano/fetch-with-streams/commit/c3e058c561b19f00aa41a2776681d48266440eba