Why don't synchronous ajax calls in jquery support timeout?
问题 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? 回答1: 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