Re: [XHR2] XMLHttpRequest and progress events

* Anne van Kesteren wrote:
>>>>> ...Can someone explain to me how the user agent knows how much  
>>>>> content it already has uploaded?
>>>>
>>>> It would need the network layer to tell it.
>>>
>>> Any suggestions on how to describe this in the specification?
>>
>> Why does it need to be in the specification?
>
>The specification needs to describe when to dispatch these events.

The user agent generates them as the upload progresses, what else is
there to say about it? In general, you cannot know exactly how much of
the data the server has received so far, you can only make a fair guess
based on how much data you've passed to the network, and how much the
other side (which might be a proxy on the line) has acknowledged. In an
extreme case a proxy on the line might have accepted all data from you,
but still hasn't connected to the target server, so the upload would be
100% or 0% complete, depending on how you look at it.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Friday, 28 September 2007 11:13:15 UTC