colorplane
Programmer
I have written a Perl HTTP server that pushes chat events to connected clients via <script> commands. Although Firefox and Opera work fine with XMLHTTPRequest, I am aware that IE will not allow access to the responseText or the innerHTML of an iframe until the connection has closed.
However, I cannot get IE to run the <script> tags in realtime (I believe this is why Comet programming like this usually works), instead they are all processed in a group after the request is complete. I wrote a test server and client which simply alert()s three times at 2-second intervals. FF and Opera display the alerts at the proper time but IE waits til the end.
Additionally, if I run the AJAX component of the script directly in the browser, IE 7 waits until the connection closes to alert() but only the first time. If I refresh the page, the alerts are delivered at the proper time (actually receiving the proper data from the server, it's not a weird cache behavior). IE 6 does not display the alerts in realtime even after a refresh.
If anyone has a suspicion as to what the problem might be, I am absolutely open to suggestions or fixes. For anyone with Perl who would like to test the sample server that I set up to demonstrate this, it can be downloaded from this post in the Perl forum:
I will be very grateful for any assistance!
However, I cannot get IE to run the <script> tags in realtime (I believe this is why Comet programming like this usually works), instead they are all processed in a group after the request is complete. I wrote a test server and client which simply alert()s three times at 2-second intervals. FF and Opera display the alerts at the proper time but IE waits til the end.
Additionally, if I run the AJAX component of the script directly in the browser, IE 7 waits until the connection closes to alert() but only the first time. If I refresh the page, the alerts are delivered at the proper time (actually receiving the proper data from the server, it's not a weird cache behavior). IE 6 does not display the alerts in realtime even after a refresh.
If anyone has a suspicion as to what the problem might be, I am absolutely open to suggestions or fixes. For anyone with Perl who would like to test the sample server that I set up to demonstrate this, it can be downloaded from this post in the Perl forum:
I will be very grateful for any assistance!