Re: ACTION-48 Draft text for XHR listing commonly implemented properties and methods that we don't specify

Hi,

> 1.) onerror - Mozilla
> 3.) onload - Mozilla, Opera, Safari (onSuccess, onComplete)
onload and onerror events would surely make usage on XHR much easier
(http://anakin.us/xhr/2.0/src.php?2). Separating onload to something
like onsuccess and oncomplete (that is solved like that in
AdvancedAJAX) seems useful but I haven't seen anyone using it, so I
think onload is enough.

> 2.) onprogress - Mozilla, Opera (using DOM3 Load)
This is the one of MUSTs. It is currently available to simulate
onprogress in Opera as it supports checking response headers, so we
can check the value of Content-length and use timer to check
responseText length. Also, adding onprogress is in my opinion much
better idea than calling onreadystatechange with readyState=3 many
times what is now done by Mozilla browser
(http://advajax.anakin.us/opera/test1b.html). If readyState does not
change why is on*readystatechange* called?

> 7.) ontimeout
> 8.) retries if failed
ontimeout is really helpful thing I have implemented in AdvancedAJAX.
It's used mostly with retries mechanizm. I don't think retries should
be implemented natively, if ontimeout will be available in XHR 2.0
then retrying connection if failed would be extremly easy to make
(http://anakin.us/xhr/2.0/src.php?3). Let's keep it useful, but
simple.

Another good idea would be to add a property specifing if cache should
be chcecked before downloading content. Currently it has to be done
manualy by sending headers or adding an unique parameter to query
string. Setting unique=true would drop cache check and download
content directly from server. Have you seen any web application based
on XHR that is actually relaying on cache before downloading content?


-- 
Regards,
 Lukasz Lach
 anakin@php5.pl

Received on Tuesday, 4 April 2006 08:58:46 UTC