ilinsky/xmlhttprequest — Issue #5: Feature request: Add timeout support
Author: HelderMagalhaes
Created: 2012-02-05 19:49:25+00:00
State: open

The [XMLHttpRequest level 2 specification recently added timeout support](http://www.w3.org/TR/XMLHttpRequest/#the-timeout-attribute), AFAIK by "inheriting" the the [feature introduced in IE8](http://msdn.microsoft.com/en-us/library/cc304105%28VS.85%29.aspx). Nightly [Gecko builds already support this feature](https://bugzilla.mozilla.org/show_bug.cgi?id=525816), which will likely be shipped in Firefox 13, so it would be great to have this feature available in a cross-browser way:

* Try to detect the `timeout` attribute and/or `ontimeout` event and use the native feature, when available;
* Fallback to a [script implementation](http://stackoverflow.com/questions/1018705/how-to-detect-timeout-on-an-ajax-xmlhttprequest-call-in-the-browser) on non-supporting environments.