Refreshed

They have: 10 posts

Joined: Feb 2004

ive made a gyestbook script in PERL and i would like to know if there is any way to make sure the page is always displayed up-to-date so the user does not need to refresh the page manually

thankyou

They have: 5,633 posts

Joined: Jan 1970

JavaScript! window.location.reload();

They have: 10 posts

Joined: Feb 2004

would that just refresh the page over and over and over again and never actually display the page, is there actually a way to get the most up-to-date version of a file automatically as oppose to having a little button that reloads the page.

Chroder's picture

He has: 91 posts

Joined: Mar 2004

You can use meta-tags:

<meta http-equiv="Expires" content="-1">
<meta http-equiv="Pragma" content="no-cache">
'
But this alone will not always work, so you should pass no-cache headers. Not sure how to do it in Perl, but PHP its like this:
<?php
 
  header
('Cache-Control: no-cache');
 
header('Pragma: no-cache');
 
?>

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.