[thelist] How to avoid caching javascript vars
Christian Heilmann
codepo8 at gmail.com
Mon Jun 26 14:42:04 CDT 2006
> So if I generate the same javascript code from a php script it will
> force the browser to pick up the new values everytime? that sounds easy
> enough,
> will try!
>
> The expiry date that you mention, would it be something like
>
> meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT" ?
No, as a header() in PHP, not as HTML.
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>
More there: http://uk.php.net/manual/en/function.header.php
More information about the thelist
mailing list