AJAX .post async

15,519

From the jQuery site:

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. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active.

That's all there is to it. If you need help on a specific problem let me know.

Share:
15,519
Nate Pet
Author by

Nate Pet

Updated on June 04, 2022

Comments

  • Nate Pet
    Nate Pet almost 2 years

    What exactly does the following do:

    $.ajax({
         type: "POST",
         async: false,
    

    vs

    $.ajax({
        type: "POST",
        async: true,
    

    Meaning what is the difference in the behavior?