什么是 jQuery 的 ajax 默认超时值?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4148830/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is jQuery's ajax default timeout value?
提问by yamspog
Does anyone know what the default jQuery ajax timeout value is?
有谁知道默认的 jQuery ajax 超时值是多少?
回答by Nick Craver
The default is 0
(technically it's undefined, but behaves as 0). This means no timeout in jQuery itself...if the browser has some timeout it's entirely possible you'll hit that.
默认值是0
(从技术上讲它是 undefined,但表现为 0)。这意味着 jQuery 本身没有超时......如果浏览器有一些超时,你完全有可能会遇到它。
Only when a timeout
option is specified does jQuery even call setTimeout()
.
只有当timeout
指定了一个选项时,jQuery 才会调用setTimeout()
.