Skip to main content

Bug Tracker

Side navigation

#7391 closed bug (wontfix)

Opened November 03, 2010 08:43PM UTC

Closed November 03, 2010 09:16PM UTC

Last modified March 10, 2012 08:31AM UTC

ajax async:false does not properly block in IE7/IE8

Reported by: KingKaeru Owned by: KingKaeru
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:
Description

jQuery ajax requests do not appear to be blocking properly when async is set to false.

The issue does not exist in firefox 3.6.* (and possibly others).

The issue exists in IE7 and IE8.

The issue exists in jQuery 1.4.3 and 1.3.2

I have attached a sample case to reproduce. In firefox, you will notice that the counter increments from 0 to 1000. In IE, the browser only displays the final number and we do not see a visual update of the counter.

Attachments (0)
Change History (9)

Changed November 03, 2010 08:46PM UTC by SlexAxton comment:1

#7392 is a duplicate of this ticket.

Changed November 03, 2010 08:47PM UTC by SlexAxton comment:2

owner: → KingKaeru
status: newpending

There is no test case attached.

Changed November 03, 2010 08:52PM UTC by KingKaeru comment:3

status: pendingnew

Can someone advise on how i can add attachments to this bug? I have a testcase available to upload.

Changed November 03, 2010 08:53PM UTC by KingKaeru comment:4

I've uploaded the Test Case here:

http://dohkiapso.com/uploads/Testsync.zip

Is there a way to attach the file instead?

Changed November 03, 2010 08:58PM UTC by SlexAxton comment:5

status: newpending

The best way is to use jsfiddle, as noted in the red box below :D http://jsfiddle.com

Changed November 03, 2010 09:00PM UTC by KingKaeru comment:6

status: pendingnew

Replying to [comment:5 SlexAxton]:

The best way is to use jsfiddle, as noted in the red box below :D http://jsfiddle.com

Tried jsfiddle but it kept crashing the browser when pasting the example in it :/ is the hosted zip sufficient?

Changed November 03, 2010 09:08PM UTC by KingKaeru comment:7

Think I got it into jsfiddle:

http://jsfiddle.net/g8Xv2/2/

Changed November 03, 2010 09:16PM UTC by SlexAxton comment:8

_comment0: Hi KingKaeru, unfortunately, this is an issue specific to the browser. IE will not make page updates until the stack completes. It is in fact able to do synchronous requests. However, most browsers will crash in when you use too many synchronous requests. All browsers block ui updates during the request. \ \ In fact, there is only _one_ use-case that everyone can somewhat agree on is ok to use synchronous ajax, and that's during the onBeforeUnload event, so you can send some data before the browser closes, etc. (Maybe). \ \ jQuery is not interesting in fixing browser incompatibilities synchronous ajax requests in long loops. It's just not a design pattern that we're interested in supporting. \ \ If you're having trouble figuring out another way to do this, feel free to ask some questions to the experts in the #jquery irc channel on irc.freenode.net \ \ Thanks!1288819028016286
_comment1: Hi KingKaeru, unfortunately, this is an issue specific to the browser. IE will not make page updates until the stack completes. It is in fact able to do synchronous requests. However, most browsers will crash in when you use too many synchronous requests. All browsers block ui updates during the request. \ \ In fact, there is only _one_ use-case that everyone can somewhat agree on is ok to use synchronous ajax, and that's during the onBeforeUnload event, so you can send some data before the browser closes, etc. (Maybe). \ \ jQuery is not interested in fixing browser incompatibilities synchronous ajax requests in long loops. It's just not a design pattern that we're interested in supporting. \ \ If you're having trouble figuring out another way to do this, feel free to ask some questions to the experts in the #jquery irc channel on irc.freenode.net \ \ Thanks!1288819100823748
resolution: → wontfix
status: newclosed

Hi KingKaeru, unfortunately, this is an issue specific to the browser. IE will not make page updates until the stack completes. It is in fact able to do synchronous requests. However, most browsers will crash in when you use too many synchronous requests. All browsers block ui updates during the request.

In fact, there is only _one_ use-case that everyone can somewhat agree on is ok to use synchronous ajax, and that's during the onBeforeUnload event, so you can send some data before the browser closes, etc. (Maybe).

jQuery is not interested in fixing browser incompatibilities in synchronous ajax requests in long loops. It's just not a design pattern that we're interested in supporting.

If you're having trouble figuring out another way to do this, feel free to ask some questions to the experts in the #jquery irc channel on irc.freenode.net

Thanks!

Changed November 03, 2010 09:38PM UTC by KingKaeru comment:9

In that case, can we update the documentation for async to highlight this inconsistency?