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


From: Rui Prior <rprior@dcc.fc.up.pt>
Date: Fri, 14 Nov 2014 18:49:21 +0000
Message-ID: <54664EB1.2020808@dcc.fc.up.pt>
To: public-webapps@w3.org
AFAIK, there is currently no way of using XMLHttpRequest to make a POST
using Transfer-Encoding: Chunked.  IMO, this would be a very useful
feature for repeatedly sending short messages to a server.

You can always make POSTs repeatedly, one per chunk, and arrange for the
server to "glue" the chunks together, but for short messages this
process adds a lot of overhead (a full HTTP request per chunk, with full
headers for both the request and the response).  Another option would
using websockets, but the protocol is no longer HTTP, which increases
complexity and may bring some issues.

Chunked POSTs using XMLHttpRequest would be a much better option, were
they available.  An elegant way of integrating this feature in the API
would be adding a second, optional boolean argument to the send()
method, defaulting to false, that, when true, would trigger chunked
uploading;  the last call to send() would have that argument set to
true, indicating the end of the object to be uploaded.

Is there any chance of such feature getting added to the standard in the

Rui Prior
Received on Monday, 17 November 2014 14:24:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:32 UTC