Is it possible to set the ajax timeout parameter using jQuery's get shorthand? If not, do requests sent with the shorthand ever timeout?
jQuery.get(
url,
[ data ],
[ callback(data, textStatus, XMLHttpRequest) ],
[ dataType ]
)
Thanks.
No, not per request, though you can use
$.ajaxSetup()
to do it for all requests.No, by default they won't (unless you used
$.ajaxSetup({ timeout: value });
), the defaulttimeout
option isn't defined, the same as0
meaning "don't timeout".To do a timeout per request and not globally, you'd have to switch to the longhand format: