Re: [XHR2] Streamed send or receive

Thanks for the information!

My understanding is that browsers have already been delivering streamed
responses in chunks (Transfer-Encoding), so it makes a lot of sense to
expose such a semantics explicitly through the XHR2 API.

Streamed requests are equally important, e.g. for use cases such as voice
translation, to allow the server to receive and process POST data in
parallel.

In short, can we improve the XHR2 API to expose the standard HTTP semantics
of sending or receiving chunked request/response data?

- Wenbo




On Thu, Oct 6, 2011 at 1:43 AM, Henri Sivonen <hsivonen@iki.fi> wrote:

> On Thu, Oct 6, 2011 at 10:57 AM, Wenbo Zhu <wenboz@google.com> wrote:
> > I'd like to hear from the WG if the following use cases or issues have
> been
> > discussed before.
> > 1) When onreadystatechange is invoked as new response data is being
> > received, currently there is no way to clear any buffered responseText
> > (alike) that has already been consumed. The lack of such a capability
> will
> > force the server to disconnect to avoid memory overflow on the
> client-side,
> > e.g. when the server is streaming a large volume of text or binary data
> to
> > the client.
>
> This problem has been solved in Firefox Aurora by adding chunked text
> and chunked ArrayBuffer response types:
> https://bugzilla.mozilla.org/show_bug.cgi?id=687087
>
> --
> Henri Sivonen
> hsivonen@iki.fi
> http://hsivonen.iki.fi/
>

Received on Friday, 21 October 2011 17:53:22 UTC