Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cancel synchronous xmlHttpRequest

219 views
Skip to first unread message

André Hänsel

unread,
Jul 24, 2009, 9:54:44 PM7/24/09
to dev-...@lists.mozilla.org
Hi,

when I perform a synchronous xmlHttpRequest by
my_xHR_obj.open('GET',url,false) I cannot abort this request by calling
my_xHR_obj.abort(). Furthermore any timeouts set by window.setTimeout are
not executed while the request is running. Scrolling the viewport also is
impossible.

I am a bit surprised because I think I tested this successfully a few weeks
ago. Maybe this is a regression in 3.5?

I am pretty sure that this is not the desired behaviour because of two
facts:

Firstly, on https://developer.mozilla.org/En/Using_XMLHttpRequest it is
written: "In versions of Firefox prior to Firefox 3, synchronous
XMLHttpRequest requests blocked the user interface. In order to make it
possible for the user to terminate frozen requests, Firefox 3 no longer does
so."

Secondly, on http://www.w3.org/TR/XMLHttpRequest/ in 4.2 an "ABORT_ERR
exception" is mentioned that "is raised when the user aborts a request in
synchronous requests". So how is it aborted?

Any ideas?

Regards,
André

Jonas Sicking

unread,
Aug 18, 2009, 8:06:54 PM8/18/09
to
André Hänsel wrote:
> Hi,
>
> when I perform a synchronous xmlHttpRequest by
> my_xHR_obj.open('GET',url,false) I cannot abort this request by calling
> my_xHR_obj.abort(). Furthermore any timeouts set by window.setTimeout are
> not executed while the request is running. Scrolling the viewport also is
> impossible.
>
> I am a bit surprised because I think I tested this successfully a few weeks
> ago. Maybe this is a regression in 3.5?

Scrolling the viewport should be possible, if it's not please file a bug
and attach a testcase.

> I am pretty sure that this is not the desired behaviour because of two
> facts:
>
> Firstly, on https://developer.mozilla.org/En/Using_XMLHttpRequest it is
> written: "In versions of Firefox prior to Firefox 3, synchronous
> XMLHttpRequest requests blocked the user interface. In order to make it
> possible for the user to terminate frozen requests, Firefox 3 no longer does
> so."
>
> Secondly, on http://www.w3.org/TR/XMLHttpRequest/ in 4.2 an "ABORT_ERR
> exception" is mentioned that "is raised when the user aborts a request in
> synchronous requests". So how is it aborted?

Actually, the change in behavior was because people didn't *want*
timeouts to fire in the middle of sync XHR requests. No other browser
did it and pages were breaking over it.

/ Jonas

0 new messages