0

I read about synchronized ajax calls. It talks about setting async:false but how to get output to understand its behavior? Can you give me a simple example?

mplungjan
  • 155,085
  • 27
  • 166
  • 222
sarang lad
  • 17
  • 6
  • 1
    `async: false` is deprecated, and will sooner or later be removed. No need to learn how it works. – Teemu May 07 '19 at 06:27
  • there is something in javascript called "async /await" functions , have a look at them – subbu May 07 '19 at 06:34

1 Answers1

1

This is a simple. After this line of code executed, the value in result variable have content immediately.

var result = $.ajax({
    type: "GET",
    url: remote_url,
    async: false
}).responseText;
Hien Nguyen
  • 23,011
  • 7
  • 48
  • 55