[Zope-dev] Use a <META...Refresh...> tag? (Re: [Zope-dev] Using Zope in a
client-server system)
client-server system)
Graham Fawcett
gmfawcett@operamail.com
Mon, 06 Mar 2000 11:20:50 -0500
> > This request would be more along the lines of an aknowledgement that the client is still connected and has received the response.
> >
> > Does this seem possible??
>
> Netscape Server Push - introduced in ver 1.1 - seems to be what you mean:
> http://www.netscape.com/home/demo/1.1b1/pushpull.html
>
> Still work with version 4.7, although the animation at the above URL
> doesn't. Try http://www.theriver.com/trwrc/serverpush.html for a demo. No
> idea about Mozilla.
I haven't read the whole thread, so forgive me if this is out of turn...
A cross-browser solution might be to start a new browser window pointing to a "connectMonitor" URL on your server, that requests a
client-side refresh every 10 seconds (or 10 minutes or whatever you need). This is done with a simple META tag in the <HEAD> section of
the HTML doc.
<META HTTP-EQUIV="Refresh" content="32;URL=http://myserver.net/connectMonitor">
Assuming 'connectMonitor' is the name of the URL serving up this page. This example makes the client wait 32 seconds and then repoll;
change the number to anything you want (zero makes an immediate refresh).
Easy to do, and it's standard HTML/HTTP.
When you want to publish a new message to all connected users, have your 'connectMonitor' method hook a bit of Javascript on the
document's onLoad() event, which will open a new browser window at the URL representing your message. (Or I guess you could just include
the message in the 'connectMonitor' page if it's something that is transient.)
-- Graham