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

[XHR] chunked

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 30 Nov 2011 16:28:12 +0100
To: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.v5rmlafp64w2qv@annevk-macbookpro.local>
A while ago sicking proposed adding chunked support to XMLHttpRequest:


A use case I remember was downloading a large file of some kind that  
presumably can be incrementally rendered as otherwise responseType "blob"  
should be sufficient. More use cases appreciated. Would help with the  

As for the feature, basically have responseType "chunked-text" and  
"chunked-arraybuffer" values and reset rather than update the response  
entity body with each progress event. And make sure that a progress event  
is dispatched when the last fetch event is queued. And make sure that this  
is only available for asynchronous usage.

Charles asked whether "chunked-text" was really needed (and whether we  
should have "chunked" which implies ArrayBuffer instead). Nobody got back  
to him on that. If it is needed, how does it work when you just have some  
of the bytes of a multi-byte character in a single chunk? Fails to decode  
as per the normal algorithm?

Also, this basically makes it possible to write EventSource on top of  
XMLHttpRequest. Is that acceptable? If it encourages more people to use a  
lower-level API, higher-level optimizations for mobile phones might become  
harder down the road.

Anne van Kesteren
Received on Wednesday, 30 November 2011 15:28:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:29 UTC