W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: [XHR2] Streamed send or receive

From: Wenbo Zhu <wenboz@google.com>
Date: Thu, 6 Oct 2011 01:02:27 -0700
Message-ID: <CAD3-0rMR+qViHrstBTPQWm26KW09s2QQW9RxTsUddHC9zktUow@mail.gmail.com>
To: public-webapps@w3.org
Cc: ian@hixie.ch
Sorry, the API for 2) should read: SendPartialRequest().

On Thu, Oct 6, 2011 at 12: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.
> An example API to solve the above problem could be:
> XMLHttpRequest.removeResponseText();      // return and clear any buffered
> response data
> 2) Currently, request body has to be sent all at once. This is not
> desirable when request data is computed from a streamed data source or from
> user input. The lack of a programmatic way to send partial request data (as
> it is being generated) will force the application to send multiple XHR
> requests. Worse yet, it actually breaks the REST semantics of the target
> resource that processes the "entire" POST body.
> A simple API to solve this problem may look like:
> XMLHttpRequest.sendPartialRequest(data);
> - Wenbo
Received on Thursday, 6 October 2011 08:02:52 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC