#7391 closed bug (wontfix)
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.
Change History (9)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Owner: | set to KingKaeru |
---|---|
Status: | new → pending |
There is no test case attached.
comment:3 Changed 12 years ago by
Status: | pending → new |
---|
Can someone advise on how i can add attachments to this bug? I have a testcase available to upload.
comment:4 Changed 12 years ago by
I've uploaded the Test Case here:
http://dohkiapso.com/uploads/Testsync.zip
Is there a way to attach the file instead?
comment:5 follow-up: 6 Changed 12 years ago by
Status: | new → pending |
---|
The best way is to use jsfiddle, as noted in the red box below :D http://jsfiddle.com
comment:6 Changed 12 years ago by
Status: | pending → new |
---|
Replying to 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?
comment:8 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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!
comment:9 Changed 12 years ago by
In that case, can we update the documentation for async to highlight this inconsistency?
#7392 is a duplicate of this ticket.