Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#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 SlexAxton

#7392 is a duplicate of this ticket.

comment:2 Changed 12 years ago by SlexAxton

Owner: set to KingKaeru
Status: newpending

There is no test case attached.

comment:3 Changed 12 years ago by KingKaeru

Status: pendingnew

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 KingKaeru

I've uploaded the Test Case here:

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

Is there a way to attach the file instead?

comment:5 Changed 12 years ago by SlexAxton

Status: newpending

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

comment:6 in reply to:  5 Changed 12 years ago by KingKaeru

Status: pendingnew

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:7 Changed 12 years ago by KingKaeru

Think I got it into jsfiddle:

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

comment:8 Changed 12 years ago by SlexAxton

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 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!

Version 1, edited 12 years ago by SlexAxton (previous) (next) (diff)

comment:9 Changed 12 years ago by KingKaeru

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

Note: See TracTickets for help on using tickets.