W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: XMLHttpRequest progress events

From: Jim Ley <jim@jibbering.com>
Date: Tue, 25 Apr 2006 11:05:35 +0100
Message-ID: <006301c6684f$cc3358a0$2402a8c0@Snufkin>
To: "Web APIs WG" <public-webapi@w3.org>

"Jonas Sicking" <jonas@sicking.cc>
> The problem lies in if the XHR implementation doesn't know the total size. 
> Then it can't give you a percentage.

Something needs to be defined to be done in this situation, not knowing the 
size is likely the standard in many uses of XHR.

> If it gives you the number of bytes transferred do far, the user or the 
> script can figure out the progress even if the XHR implementation doesn't 
> know the total size.

Exactly, if we look at existing implementations, the IE onProgress event 
(not available in a default security environment) provides currentBytes and 
totalBytes (or 0) which I've used for preloading resources.


Macromedia Flash does the same


If there was always a content-length, then there'd be no problem with just 
having a percentage, however there's not. It's another problem with trying 
to re-use properties from a defunct specification that considered such a 
tight range of use cases as the DOM3 L&S - it was about parsing XML 
documents, not downloading web content.

Received on Tuesday, 25 April 2006 10:06:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:21 UTC