logo
Search
showing results for - "set timeouts to xmlhttprequests in javascript"
Alessio
25 Jul 2018
1let xhr = new XMLHttpRequest (); 
2xhr.onreadystatechange = function () {  
3    if (this.readyState == 4) {  
4        clearTimeout(timeout);  
5        // do something with response data 
6    }  
7}  
8let timeout = setTimeout( function () {  
9    xhr.abort(); // call error callback  
10}, 60*1000 /* timeout after a minute */ ); 
11xhr.open('GET', url, true);  
12
13xhr.send();
source
similar questions
settimeout vs requestanimationframesettimeout en javascriptsetting timeout in javascriptsettimeout jsset time in javascriptjs timetoutjs after settimeoutsettimeout javascripttimeout for javascriptjavascript settimeoutset function to execute at certain time jsset timeout javascriptsettimeout functionjavascript timeoutjs settimeoutjavascript set timeouttimeout javascriptjavascript this in settimeoutsettimeout javascript see how much time is left
queries leading to this page
where to check xhr request timeoputbrowser web apis js ajax settimeoutxhr timeoutjs xmlhttprequest timeoutset a timeout xmlhttp request jsjvascript xmlhttprequest set time outxmlhttprequest timeout exhr timeout timexhr timeoutjavascript xmlhttprequest timeoutxml request set timeouttimeout xmlhttprequestxmlhttprequest javascript set timeoutset timeouts to xmlhttprequests in javascriptset timeouts to xmlhttprequests in javascript
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue