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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.