Answer the question
In order to leave comments, you need to log in
Synchronous request blocks preloader()?
In general, there is code like
the ajax request function () {
here requests are processed synchronously in a cycle
}
the preloader function () {
here the inscription "Loading" is simply hung on the body and darkens the background.
}
button.click(
preloader()
ajax requests()
);
The trouble is that the requests are processed, but the preloader never appears. Tried to put in beforeSend, and in requests, nothing helps.
BUT as soon as I remove async: false and translate it to true, the preloader is shown.
It also works if I just enter the preloader display code into the console.
Has anyone experienced this?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question