I'm trying to set the Refresh: header with CGI.pm, but I seem to be missing something. I thought that the value was the time in seconds that you can view the page before refreshing:
print $q->header( -type => 'text/html', -expires => '-1d', -pragma => 'no-cache', -refresh => '100' ), $q->start_html( -title => 'Some Company's Bond Ticker', -bgcolor => '#00092A', -background => '../images/i-4-bg.gif', -onLoad => 'initSymbols()', -script => $script, -style => { -code => $css } );
It's taking abysmally long to refresh, however. I tried setting the time to '30' and it took several minutes (I stopped timing after two minutes and noticed it refreshing later). Shouldn't this generate the same result as <meta http-equiv="Refresh" content="100">?

The headers it generates look like this:

Expires: Thu, 05 Oct 2000 23:10:04 GMT Date: Fri, 06 Oct 2000 23:10:04 GMT Pragma: no-cache Refresh: 100 Content-Type: text/html
I'm using IE 5.5, and the page in question is bond ticker in a frame running along the bottom of a Page. The page also has a bit of JavaScript, so I wonder if that has any effect -- perhaps throwing the browser's timing off? Also, if this is not a reliable method of refreshing the Web page, can anyone make any suggestions?

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just go the the link and check out our stats.


In reply to Refreshing a Web page via Perl by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.