Reputation: 132
Is there any maximum timeout for the xmlhttprequest ? Currently its not possible to set timeout value more than 1 minute in chrome. let xmlHttpRequest: XMLHttpRequest = new XMLHttpRequest(); xmlHttpRequest.timeout = 120000;
Upvotes: 2
Views: 6217
Reputation: 4523
Yes, there is a maximum timeout for xmlhttprequest
in chrome, and that is 1 minute. Unfortunately you can not increase the timeout by setting the timeout
property of xmlhttprequest
in chrome. But if you are on windows, you might possibly set the maixmum tmeout with the help of regedit
, and the steps are ...
window + r
> type regedit
> press enter
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings
DWORD
vale named KeepAliveTimeout
and set the data value 120000
(2 min.)ServerInfoTimeout
, following the same stepsUpvotes: 5
Reputation: 958
No, the XMLHttpRequest object does not have a maximum timeout value, because the default timeout value is 0, meaning infinite.
Source: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout
You mentioned Chrome: the network stack you are on does have timeout limitations.
Google Chrome will not let you change the default timeout values.
Upvotes: 2