http://qs1969.pair.com?node_id=75476


in reply to A Simple "Tail" Question

If I understand you correctly you want to run the equivalent of tail -f over a web link. The problem there is the CGI implementation doesnt really like things like that. Most servers time out their CGI scripts after 30-60 seconds or so (as defined by the server config) and any data sent after that will be lost.

If you want to continuously send data to a web page you need to do one of three things. The first option is to use some sort of server push technology to keep on updating the page, however IE doesn't really like this. The second option is to put a refresh meta tag into the page you generate with your CGI script so that your page reloads itself after every n seconds, an example of this is below.

<meta http-equiv="refresh" content="5;URL=This.html">

This method, using the tag above, would refresh your page every 5 seconds. This method is very resources-intensive though.

The final option is to place an applet or flash/director movie on your page and then establish a socket between that and a script on your machine. You can then maintain a permanent connection between the two. A good place to start looking into this option ould be via perlipc.

On the other hand, I may have grasped the wrong end of the stick completely so please ignore me ;)

$japh->{'Caillte'} = $me;