I was reading here that synchronous ajax calls in jquery don't time out.
Is this a technical limitation, or just something the authors didn't feel like supporting? What actually happens under the table when an ajax call is synchronous?
The browser handles synchronous/asynchronous requests via the XMLHttpRequest API, but it does not have a built-in timeout feature. JQuery implements its own timeout in JavaScript on top of the browser XHR API.
Since a synchronous call blocks all running scripts, the JQuery timeout does not work. In theory, it seems like synchronous timeouts would be possible if they were implemented at the browser level, as opposed to the JS level.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With