previous page button of browser opening on-rev server page

Jan Schenkel janschenkel at yahoo.com
Tue Jul 26 05:57:46 EDT 2011


I don't think setting the 'httpHeaders' will do what you want - that's meant for getting a URL or posting to a it from within your LC script.

Try this instead (untested, but should do the trick, I think):

<?rev
put header "Cache-Control: no-cache, must-revalidate"
put header "Expires: Fri, 30 oct 1998 14:18:41 GMT"
put the long time
?>


HTH,

Jan Schenkel.

=====
Quartam Reports & PDF Library for LiveCode
www.quartam.com

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


----- Original Message -----

From: paolo mazza <mazzapaoloitaly at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Subject: Re: previous page button of browser opening on-rev server page

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:

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;
}
?>

<html>
<head>
</head>
<body>
<?php echo getDateTime() ?>
</body>
</html>

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 solution (PHP) sets the heathers properly but still
when I move back and forth with the buttons of the browser I get the
old time  (cache). 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

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list