Re: Question about sessions: how to force expiry

From: Date: Thu, 22 Aug 2002 15:14:49 +0000
Subject: Re: Question about sessions: how to force expiry
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-113629@lists.php.net to get a copy of this message
Hi, Place these headers in the top of your php file just below the <?PHP and your problem should be gone. header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); Greetings Peter "Donpro" <donpro@lclcan.com> schreef in bericht news:004601c249dd$9a0034a0$c889cdcd@lclcan.com... > Hi, > > I am using a session variable to create an area where customers can access > certain pages via login/password. If they successfully login, I create a > session variable and initialize it with their logon username. > > I also have a logout button which unregisters the session variables and > issues a session_unset() and session_destroy(). Then is takes them back to > the login page. > > Now all my pages in this area first check if the session variable is set and > if not, displays a message that the user must first login. > > I noticed that after logging out and clicking click on the "Back" button in > my browser, it takes me back to the previous page which is does NOT display > the warning that the user must login. However, when I click on the Refresh, > it does. Is this some sort of caching problem? I note that other sites > with similar setups do not have this problem. When I click on the "Back" > button, I saw an expiry message. > > How can I emulate this please? > > Thanks, > Don > >

« previous php.general (#113629) next »