Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17633
| From | Stefan Weiss <krewecherl@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: ajax request with no response |
| Date | 2012-12-10 00:53 +0100 |
| Organization | albasani.net |
| Message-ID | <ka3895$a7g$1@news.albasani.net> (permalink) |
| References | <67WdnSfJBNQHTV7NnZ2dnUVZ_uGdnZ2d@westnet.com.au> <7171452.m6WORY6t7m@PointedEars.de> <0pudneAzZbF8YlnNnZ2dnUVZ_h-dnZ2d@westnet.com.au> |
On 2012-12-09 22:17, Andrew Poulos wrote: > On 10/12/2012 5:51 AM, Thomas 'PointedEars' Lahn wrote: >> There is always a response. As much too often with your questions, why do >> you not try it *before* you post? >> >> <http://www.catb.org/~esr/faqs/smart-questions.html#idp29963616> > > 1. You knew that "There is always a response." I did not. Nothing I've > read about ajax stated that. Still I do not fully understand what "There > is always a response." means. There isn't necessarily always a response from the XMLHttpRequest target, but the XHR object will still (eventually) reach a readyState of 4. This holds true even if - the provided URL is not valid - the URL could not be loaded (DNS failure, server down, ...) - the connection breaks down before the response - the remote server is shut down before it can send the response - the remote server redirects to another URL - the client calls the XHR's abort() method - the client navigates away before receiving a response - the XHR.timeout value was reached - etc. In theory, unless you set a timeout for the XHR (where supported), it could take forever before you get to the readyState=4 stage, because TCP connections don't have a maximum duration. In practice, I'd like to see the system that can keep up a TCP connection forever. My personal record was 2 months :) - stefan
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
ajax request with no response Andrew Poulos <ap_prog@hotmail.com> - 2012-12-09 10:43 +1100
Re: ajax request with no response Stefan Weiss <krewecherl@gmail.com> - 2012-12-09 01:17 +0100
Re: ajax request with no response JJ <jaejunks@glegooilma-swapit.com> - 2012-12-10 04:17 +0000
Re: ajax request with no response Stefan Weiss <krewecherl@gmail.com> - 2012-12-10 11:03 +0100
Re: ajax request with no response JJ <jaejunks@glegooilma-swapit.com> - 2012-12-11 11:06 +0000
Re: ajax request with no response Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-09 19:51 +0100
Re: ajax request with no response Andrew Poulos <ap_prog@hotmail.com> - 2012-12-10 08:17 +1100
Re: ajax request with no response Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 00:25 +0100
Re: ajax request with no response Stefan Weiss <krewecherl@gmail.com> - 2012-12-10 00:53 +0100
csiph-web