[whatwg] XMLHttpRequest.status on connection timeout

Jim Ley jim.ley at gmail.com
Wed Nov 30 02:12:28 PST 2005

On 11/30/05, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> What should XMLHttpRequest.status return on connection timeout?  Ian and I were
> talking about this, and it seems like "502" is a good response code here...
> See https://bugzilla.mozilla.org/show_bug.cgi?id=304980

I understood the aim was to mimic IE's implementation? Which will
return a 5 digit code in the 12xxx range from WinInet for errors not
returned by a server)

Of the 5xx 504 is more justifiable than 502, as then you can pretend
the browser is simply a proxy which has timed out,  502 which
specifically mentions an invalid response doesn't sound a good idea.

I believe Safari now has a 1 year timeout, so that could be an
interesting test to run on a release build :-)


More information about the whatwg mailing list