Michael Nachbaur asked:
> This is off-topic, but I need an answer pretty quick, and I *am*
> writing this app using mod_perl, so its sorta related (also, I don't
> want the headache of re-subscribing to a new list).
>
> You know those online web-based tech support chat systems? Its
> commonly frame based, but its just like IRC, but over HTML. when a
> user posts a message it immediatly pops up on the chat frame, and you
> submit your message through a regular-ol' HTML form. I don't think
> this is an applet, because this works in all sorts of browsers. I
> think its javascript, but I'm not sure. My main question, is when the
> server knows that a new message has been posted, how does it push that
> new page out to the client web browser? I'm used to all page-views
> originating from the client...not the server.
The two "regular" answers are meta refresh and server push. But meta
refresh is clunky and server push apparently doesn't work well with IE.
When I had to implement this, I found a third option that experimentally
seems to work quite well: just keep the connection open and send the
messages as they are generated. Since major browsers show webpages
incrementally, you'll get much smoother display than with meta refresh.
The remaining problem is to get the browser to scroll down, but you can
do that with javascript.
And for clients where that doesn't work, there's always meta refresh.
OTOH, you probably don't want to do that with Apache and mod_perl, for
two reasons: 1) keeping an appache process per long-term client is
hugely wasteful, and 2) multiple processes are a lousy way to implement
a chat backend, because they need to notify each other of new messages.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html