ypran Posted April 30, 2008 Share Posted April 30, 2008 i have set cache-control to no-cache even then it is caching the page and storing it in the memory cache.This is my code can any one help me out <?php session_start();// Start Session. // Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); // is the one accessing this page logged in or not? if (!$_SESSION['is_logged_in'] == 1 ) { // not logged in, move to login page //header ('HTTP/1.1 301 Moved Permanently'); header('Location: login1.php'); exit; } else { ?> <html> <head> <title>Main User Page</title> <meta http-equiv="cache-control" content="no-cache, pre-check=2, post-check=1"> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="refresh" content="150"> </head> <body> <p>This is the main application page. You are free to play around here since you are an autenthicated user :-) </p> <p> </p> <p><a href="logout.php">Logout</a> </p> </body> </html> <?php } ?> It is showing the status of cache source as Memory cache. How can i change this to not-cached by the help of code. Link to comment https://forums.phpfreaks.com/topic/103541-problem-with-cache-control/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.