<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
<?php
function clearBrowserCache() {
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
}
clearBrowserCache();
$_SESSION['test']="demo";
//echo $_SESSION['test'];
clearstatcache() ;
?>
- this code is only allowing browser to not to catch cache .but i want to delete all cache using simple code is there any way to do it ? simply i when i run this code my browser's cache should get deleted. how to do it ?