javascript - Handling AJAX timeouts -


i know how timeouts (case server down) can handled ajax call. using chrome v28.

i did lot of search on google , couldn't find convincing answer other checking status == 0 on readystate callback function. way of handling it? not using jquery or other frameworks.

although highly recommend using jquery since simplifies ajax calls , can have response set these kinds of situations, use settimeout(timeoutcallback, amountoftime) achieve without worrying statuses. basically, callback abort ajax request , handle error want if request wasnt satisfied in time. if want more details, got information question on stack overflow: how detect timeout on ajax (xmlhttprequest) call in browser?. hope helps!


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -