Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When do I use a synchronous versus a asynchronous request?

0
Posted

When do I use a synchronous versus a asynchronous request?

0

Asynchronous is more complex to manage, many prefer using XMLHttpRequest in Synchronous mode which could have a negative effect specially on high load or slow website link, because the JavaScript engine is blocked until the request completes. That’s why today we use AJAX and not SJAX, and the complexity of asynchronous programming is better handled today with the multitude of frameworks and techniques which make AJAX interfaces more fluid.

0

Good question. They don’t call it AJAX for nothing! A synchronous request would block in page event processing and I don’t see many use cases where a synchronous request is preferable.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.