A note about synchronous xmlhttp requests and Firefox
By Chris on Jun 5, 2007 | In Development & Design, Scripting, Bugs, "Features" & Things Not Right | 6 feedbacks »
Since I just spent the better part of Friday debugging this problem and then the better part of Friday night Googling for a work around, it's worth noting that there is a "bug" in the Firefox implimentation of the xmlHTTPRequest object when using it for synchronous calls (i.e. the rest of the script pauses and waits for the request to complete, unlike typical asynchronous AJAX calls). When using the xmlhttp object in a synchronous fashion, Firefox does not process the onreadystatechange handler. Thus, any libraries that are dependant on this (for running post processing functions for example) will fail to work under these conditions. Interestingly, having the Firebug extension installed causes the object to behave properly. So a secondary note is to always test your apps in a "clean" instance of Firefox.
Here are the details that I came across, along with a work around: Lukav’s Weblog » Blog Archive » Firefox firebug and synchronos calls problem.
I've also set up a set of tests to demonstrate the problem. Try in both Firefox and IE to see the differences.
Trackback address for this post
6 comments
Not a brilliant solution I know!
http://snippets.dzone.com/posts/show/5416
It's an XHR request object based on the work of Brad Fults (http://xkr.us/code/javascript/XHConn/) with the patch mentioned above applied. For Brad's sake and mine, please keep all comments intact if you use this in your own applications.
https://bugzilla.mozilla.org/attachment.cgi?id=234988
See
https://bugzilla.mozilla.org/show_bug.cgi?id=313646#c9
Leave a comment
| « Differences in HTML 5 from HTML 4 | Greasemonkey Scripts I really can't live without » |