mental blank

Stephen Clarke any at longusername.worldonline.co.uk
Sun May 5 17:23:03 CDT 2002


----- Original Message -----
From: "Stray Toaster" <mwk at stray-toaster.co.uk>
To: <belfast-pm at pm.org>
Sent: Sunday, May 05, 2002 10:01 PM
Subject: mental blank


> How do I make a web page refresh after a set period of time? Like I
> display an image, the after a bit of time display another one? But
> without the user clicking on refresh.
>
Hi,

Besides the HTML meta tag, you can also do it in the HTTP headers. In CGI.pm
that would be, for example,

header(-refresh=>'2; URL=http://tux.blackstar.co.uk');

This will generate the following headers.

refresh: 2; URL=http://tux.blackstar.co.uk
Content-Type: text/html; charset=ISO-8859-1

These examples will refresh every 2 seconds.

I don't know how you would change the image, but how about keeping a running
count in a cookie and sending back the corresponding image file?

Just my $0.02.
--
Best,sc





More information about the Belfast-pm mailing list