previous page button of browser opening on-rev server page

paolo mazza mazzapaoloitaly at gmail.com
Mon Jul 25 11:08:33 EDT 2011


Thank you all. Trying to get rid of the browser cache setting the
proper headings (as Shao Sean suggested) , I came up with these 2
solutions:

FIRST ONE WITH PHP

<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Fri, 30 oct 1998 14:18:41 GMT");
?>

<?php
$dateTime = date("Y:m:d-H:i:s");
function getDateTime() {
global $dateTime;
return $dateTime;
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Documento senza titolo</title>
</head>
<body>
<?php echo getDateTime() ?>
</body>
</html>

THE SECOND ONE  WITH LIVECODE  ... much easyer  ;-)

<?rev
put "Cache-Control: no-cache, must-revalidate" & return & "Expires:
Fri, 30 oct 1998 14:18:41 GMT" into MYHEADERS
set the httpHeaders to MYHEADERS
put the long time
?>

HOWEVER,
the first one (PHP) set the heathers properly but still I get the old
time in the page (cache) when I move back and forth with the buttons
of the browser.

The second one (LiveCode) does NOT set  the headers properly (is it a
bug?) and the page remains in the browser cache.

Any idea?

All the best

Paolo Mazza




More information about the use-livecode mailing list