ralijani has asked for the wisdom of the Perl Monks concerning the following question:

I have a cgi page written in perl and running on apache. I want this page be automaticly refresh every 30 sec. how could i do?

Replies are listed 'Best First'.
Re: how to refresh a cgi page?
by thinker (Parson) on Jun 21, 2003 at 09:23 UTC
    Hi ralijani,

    If you are using CGI.pm, pass a refresh value to the header method, like this
    print $q->header({refresh => 30 });
    I hope this helps

    thinker

      Whilst this is widely supported, it should be borne in mind that this is a Netscape extension to HTTP and is not actually described in the HTTP RFC so there is always an outside chance that you will one day hit a client that doesn't know what to do with this header. The same is also true of the "META REFRESH" element commonly used in HTML.

      /J\
      
Re: how to refresh a cgi page?
by BrowserUk (Patriarch) on Jun 21, 2003 at 09:25 UTC

    This isn't really a perl problem, but this may help you.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


Re: how to refresh a cgi page?
by yosefm (Friar) on Jun 21, 2003 at 09:06 UTC
    I think the best way to do it is to print a javascript timeout into your page.
      I have no other good solution but I wish to extend the question : how to refresh partially a cgi page with mozilla / netscape and also IE ?