Sergey Ilinsky has written a great article about cross browser XMLHttpRequest implementation wrapper. The benefit of using this wrapper we can fix things like below:
- Missing static members (UNSENT, OPEN, SENT, LOADING, DONE) in All browsers
- missing native XMLHttpRequest object support in Internet Explorer 6.0
- memory leak caused by onreadystatechange handler in Internet Explorer 6.0
- onreadystatechange wrong execution context in Internet Explorer All
- onreadystatechange wrong execution context in Gecko All
- readystatechange OPEN fired twice in Internet Explorer All
- readystatechange OPEN fired twice in Gecko All
- missing readystatechange calls in synchronous requests in Gecko All
- unnecessary readystatechange DONE call when request aborted in Gecko All
- annoying “<parsererror />” document in invalid XML responses in Gecko All
- caching bug in Internet Explorer 6.0
The picture above is the result of Sergey XMLHttpRequest implementation in various browsers. The wrapper download here



















0 Responses to “Re-inventing XMLHttpRequest: Cross-browser implementation with sniffing capabilities by Sergey Ilinsky”