in reply to Re: Streaming JS commands to IE with a Perl HTTP push server
in thread Streaming JS commands to IE with a Perl HTTP push server

Well I think you got me going on a good track of checking different HTTP headers and re-examining the example at http://empireenterprises.com/_comet.html

Unfortunately I still have no luck with IE with different headers, meta tags, regular tags, etc. I re-examined the example and saw that he's not printing javascript functions at all, but rather just JSON objects. JSON is useless unless it is evaluated, so I think that he is somehow actually accessing the innerHTML during page load in IE (unfortunately have not been able to contact him). His client code obviously does this but I have no idea how the server gets IE to work (I even tried the exact same headers and tags).

I tried a new test to see if the script may be executing but not interacting by setting a variable to the current Javascript time in each step, waiting two seconds, then setting again. The last time I used an alert() to print the values. Firefox - three different times, IE - same time.

The other major working example is here: http://meteorserver.org/

The code is much more complicated, but they also created a Perl server. I am not able to pick it apart enough to tell what is wrong with mine. Ugh - I thought for sure something would give me hope today.
  • Comment on Re^2: Streaming JS commands to IE with a Perl HTTP push server

Replies are listed 'Best First'.
Re^3: Streaming JS commands to IE with a Perl HTTP push server
by freefall (Initiate) on Aug 21, 2007 at 02:22 UTC
    For anyone interested in this post, I discovered the solution to the problem. Before Internet Explorer will start streaming Javascript commands or any content, it must receive 256 bytes of data. This is as simple as
    print $sock ' ' x 256;
    What a ridiculous solution. I found this in the last sentence of the PHP manual entry for "flush".