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;
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;
Share Improve this question asked Mar 15, 2017 at 0:10 MadhuMadhu 1323 silver badges10 bronze badges 1- what happens if you do – Jaromanda X Commented Mar 15, 2017 at 0:54
2 Answers
Reset to default 4Yes, 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 ...
- press
window + r
> typeregedit
> pressenter
- navigate to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings
- create a
DWORD
vale namedKeepAliveTimeout
and set the data value120000
(2 min.) - create another value named
ServerInfoTimeout
, following the same steps - restart PC
No, the XMLHttpRequest object does not have a maximum timeout value, because the default timeout value is 0, meaning infinite.
Source: https://developer.mozilla/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.