July 26th, 2007, 02:51 PM
Comet - can't get rid of browser loading bars
I have a standard page implementing the Comet concept which contains a hidden iframe with src set to a Perl event listener script. The script listens for events dispatched by a custom event server and relays these events in script tags. This setup eliminates the need to poll the server with AJAX and query the database for changes, and it also provides instant publishing of every event to all listeners.
The setup works as expected in Opera, Firefox, and IE, although Opera and Firefox perpetually display the "progess" cursor and the content loading bar. Other Comet implementations that I have seen do not trigger the loading bar.
Perhaps I am misunderstanding or incorrectly implementing Comet. Does anyone know how the setup could be modified such that the loading bar is not triggered? The other aspect of this problem is that pressing the Stop button or Esc key terminates the connection.
I have also tried a persistent XMLHTTPRequest in Firefox and Opera. This effectively eliminates the loading bar problem, but instead a memory leak appears in Firefox even when no content is returned.
The page itself is printed by a mod_perl2 script on an Apache 2.0 server. The page itself starts with the html and body tags as well as the text/html content-type header with no content-length.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!