From: Sean Kinsey on 8 Apr 2010 15:07 On Apr 8, 9:02 pm, Jorge <jo...(a)jorgechamorro.com> wrote: > On Apr 8, 8:42 pm, Sean Kinsey <okin...(a)gmail.com> wrote: > > > > > > > On Apr 8, 8:19 pm, Sean Kinsey <okin...(a)gmail.com> wrote: > > > > On Apr 8, 8:00 pm, Jorge <jo...(a)jorgechamorro.com> wrote: > > > > > On Apr 8, 5:45 pm, Antony Scriven <adscri...(a)gmail.com> wrote: > > > > > > Synchronous requests don't tend to improve the user's > > > > > experience. --Antony > > > > > But onunload you can't do an asynchronous XHR. > > > > -- > > > > Jorge. > > > > Perhaps not, but I have seen it done in onbeforeunload. > > > The code athttp://kinsey.no/code/xhronunload/runssuccessfully on > > onunload in current versions of Firefox, Chrome, Safari and Internet > > Explorer, and also in IE 6. > > I didn't take the time to get the onunload event in Opera to fire, so > > I don't know about that one. > > ...syncrhonously: xhrObj.open('GET', "index.html", **false**); > -- > Jorge. Right, you said asynchronous earlier. But then I said synchronous from the start :)
From: Jorge on 8 Apr 2010 15:29 On Apr 8, 9:07 pm, Sean Kinsey <okin...(a)gmail.com> wrote: > > Right, you said asynchronous earlier. But then I said synchronous from > the start :) Yes, I know :-) I was pointing out to Scriven that onunload that's the only way to XHR. (synchronously) -- Jorge.
From: Antony Scriven on 8 Apr 2010 16:18 On Apr 8, 7:00 pm, Jorge wrote: > On Apr 8, 5:45 pm, Antony Scriven <adscri...(a)gmail.com> wrote: > > > > > Synchronous requests don't tend to improve the user's > > experience. --Antony > > But onunload you can't do an asynchronous XHR. I wasn't talking about asynchronous XHR. --Antony
From: Jorge on 8 Apr 2010 16:37 On Apr 8, 10:18 pm, Antony Scriven <adscri...(a)gmail.com> wrote: > On Apr 8, 7:00 pm, Jorge wrote: > > On Apr 8, 5:45 pm, Antony Scriven <adscri...(a)gmail.com> wrote: > > > > Synchronous requests don't tend to improve the user's > > > experience. --Antony > > > > But onunload you can't do an asynchronous XHR. > > I wasn't talking about asynchronous XHR. --Antony But any other attempt to fetch an additional resource onunload might fail. I.e. an <img>. E.g. in Safari. -- Jorge.
From: Antony Scriven on 9 Apr 2010 04:26
On Apr 8, 9:37 pm, Jorge wrote: > On Apr 8, 10:18 pm, Antony Scriven <adscri...(a)gmail.com> wrote: > > > On Apr 8, 7:00 pm, Jorge wrote: > > > On Apr 8, 5:45 pm, Antony Scriven <adscri...(a)gmail.com> wrote: > > > > > Synchronous requests don't tend to improve the user's > > > > experience. --Antony > > > > > > But onunload you can't do an asynchronous XHR. > > > I wasn't talking about asynchronous XHR. --Antony > > But any other attempt to fetch an additional resource onunload might > fail. I.e. an <img>. E.g. in Safari. Don't do that either. --Antony |