Bug Tracker

Modify

Ticket #7391 (closed bug: wontfix)

Opened 3 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 3 years ago by SlexAxton

#7392 is a duplicate of this ticket.

comment:2 Changed 3 years ago by SlexAxton

  • Owner set to KingKaeru
  • Status changed from new to pending

There is no test case attached.

comment:3 Changed 3 years ago by KingKaeru

  • Status changed from pending to new

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

comment:4 Changed 3 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 follow-up: ↓ 6 Changed 3 years ago by SlexAxton

  • Status changed from new to pending

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 3 years ago by KingKaeru

  • Status changed from pending to 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:7 Changed 3 years ago by KingKaeru

Think I got it into jsfiddle:

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

comment:8 Changed 3 years ago by SlexAxton

  • Status changed from new to closed
  • Resolution set to wontfix

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!

Last edited 3 years ago by SlexAxton (previous) (diff)

comment:9 Changed 3 years ago by KingKaeru

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.