in reply to refreshing CGI display
I have a couple of perl powered web pages that are used for monitoring servers/services at $work. I'm not at $work at the moment, but IIRC, for the pages that I want to have automatically refresh themselves I put the following in the header (where refresh is usually 90 or 300 depending):
# config stuff: my $cfg = { refresh => 300, interval => 5, }; # at some point later in the script: my $expires = strftime("Expires: %a, %d %b %Y %H:%M:%S GMT\n", gmtime(time+60*$cfg->{interval})); print <<"EOF"; Content-Type: $content_type Refresh: $cfg->{refresh} Pragma: no-cache Expires: $expires EOF
No javascript needed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: refreshing CGI display
by cmic (Acolyte) on Jun 06, 2005 at 10:54 UTC |