W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: [XHR2] Progress events during synchronous requests

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 12 Feb 2009 10:19:49 +0100
To: "Jonas Sicking" <jonas@sicking.cc>, "Webapps WG" <public-webapps@w3.org>
Message-ID: <op.uo8evbh364w2qv@annevk-t60.oslo.opera.com>

On Wed, 11 Feb 2009 22:44:17 +0100, Jonas Sicking <jonas@sicking.cc> wrote:
> Is there a reason why the spec says to not send progress events
> (upload and download) during synchronous requests, while still saying
> that readystatechange events should be fired?
>
> I guess it can be argued that progress events (especially the load
> event) is less useful for synchronous loads and that not dispatching
> them is a performance optimization. Is that the reason?
>
> I don't really feel strongly either way, though I do think that from a
> web developers point of view it would be more useful to dispatch the
> events than not to dispatch them. And being consistent with regards to
> readystatechange is always nice.

It is a performance optimization, yes. Firing a lot of progress events for  
a large file that is synchronously downloaded in a Web Worker seems like  
waste. The reason readystatechange events are dispatched is because  
Internet Explorer already did that.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Thursday, 12 February 2009 09:20:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:30 GMT