If you are looking for information on multithreading or timeouts, scroll to the end of this tutorial
IE 6.0 caches responses to XmlHttpRequests; there may be a way to set headers and such so that IE 6.0 won't do this, but for now, I just append random crap to the querystring in order to fool IE into grabbing a fresh version for every request. Note IE also has issues with caching images.
XmlHttpRequest works in IE 6.0+, Firefox 1.0+, and the latest version of Opera. Beyond this, I am unsure; I would like to know what exactly the browser requirements are. Because some browsers do not support XmlHttpRequest, consider using IFrames. Here's an excellent introduction to iframe elements. You may be interested to know that IE7 now supports a native XmlHttpRequest object.
Without further ado, check out the textbox below (you will need to enable the
Refresh this page to reenable XmlHttpRequest. Timeout in attempting to get data from the server.
There is generic code in the [nicely commented] xmlhttprequest.js file and code specific to this example on this page (view the source). The only other code you need is a few lines of ASP.NET code, which I have written in C#:
And in PHP:
There seems to be a fair deal of inquiry on the web as to XmlHttpRequest timeouts.
It appears that the XmlHttpRequest object itself has no support for timeouts, but
one can always use
Ajax blog and Ajax Patterns seem to have covered this issue in detail.
If you found this tutorial helpful, please link to it. If you really want to show your appreciation... :-)