Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in .ajax calls, is async: true assumed by default?

Tags:

jquery

ajax

Some of the code I've seen specifies async:true and other code async:false. If I don't declare async at all, does it default to true, so ajax calls are by default asynchronous?

like image 603
twitter Avatar asked Nov 27 '22 00:11

twitter


1 Answers

Looking at the documentation of jQuery.ajax (quoting) :

By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false.

like image 123
Pascal MARTIN Avatar answered Dec 11 '22 03:12

Pascal MARTIN