| Do i need $.ajax async:false if using success: callback function?
|
nelsonm

msg:4462200 | 9:01 pm on Jun 6, 2012 (gmt 0) | Hi all, I was looking over my code and noticed that i had jquery .ajax methods that had the async:false setting in a few javascripts. So i looked it up on the jQuery site and it said that As of jQuery 1.8, the use of async: false is deprecated. Why would it be depreciated? I'm not sure i even need async:false, doesn't using a callback function as the success setting value negate the use of async:false? thanks,
|
daveVk

msg:4462813 | 6:10 am on Jun 8, 2012 (gmt 0) | Provided the code following the ajax call does not rely on the completion of the ajax, the async:false can be removed, such code should be in the callback.
|
nelsonm

msg:4462897 | 12:07 pm on Jun 8, 2012 (gmt 0) | what's the idea behind async:false being depreciated anyway?
|
Fotiman

msg:4462948 | 1:53 pm on Jun 8, 2012 (gmt 0) | [bugs.jquery.com...]
|
enigma1

msg:4462952 | 1:57 pm on Jun 8, 2012 (gmt 0) | It's because synchronous requests can lock up the ajax state and browser. IMO it should been like this from the beginning and have the code serialize the ajax requests if necessary.
|
nelsonm

msg:4462990 | 3:53 pm on Jun 8, 2012 (gmt 0) | ok, thanks.... I changed all my scripts to remove the potential problem and every thing still works.
|
|
|