XMLHttpRequest and Browser Compatibility
If you have any comments/questions, please visit the blog entry about these tests.
Last updated on Aug 12, 2006.
The notes below are based on testing with the latest released versions of Firefox (1.5.x), Internet Explorer (6.x) and Opera (9.0). The experience with other browsers may be different from the notes below.
Not supported by latest versions of Firefox (1.5), Opera (9.0), and Internet Explorer (6.0).
When async = false, Firefox will not call the onreadystatechange handler.
With Internet Explorer, responseXML is a non-null object when readyState is less than 4..
Firefox, Internet Explorer, and Opera return a non-null object for responseXML even when the response XML is malformed.
Internet Explorer throws a runtime exception when readyState = 3. Opera returns a status 0 and empty statusText when readyState = 1.
The behavior of Firefox seems correct in this case. It does not make sense to call abort before send, and Firefox throws an exception if abort is called when readyState = 1.
Firefox returns getAllResponseHeaders when readyState = 2. Opera returns a empty string and Firefox throws an exception when readyState = 1. Firefox behavior makes sense.
Internet Explorer excludes response headers such as Date, Server, Connection.
When a request header is not available Firefox returns null instead of an empty string.
Upon calling open when readyState = 4, Firefox resets the readyState to 1 instead of 0.
Opera does not raise an exception when send is called before open.
Firefox does not complain if setRequestHeader is called when readyState = 4.