Re: sessions and history

From: Date: Tue, 09 Oct 2001 08:23:48 +0000
Subject: Re: sessions and history
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67588@lists.php.net to get a copy of this message
> >From the moment I started using php4-sessions I got problems with the back- > and nextfunctions (history)... > > It seems that when I click back, my browser doesn't get the previous page > from the local cache, but makes a new http-request. > If I visited the same page twice, with different values for the parameters, > I get the latest values (from the sessionvars).... als when I go back to the > first page..... > > Does anybody recognize this problem and has an answer to it? You can try setting session.cache_limiter to 'private' instead of 'nocache' in your php.ini file, which is the default. You can also try doing something like the following at the top of your files: Header("Cache-Control: private, max-age=%i, must-revalidate"); // %i = nsecs until expiration Header("Pragma: no-cache"); // for older browsers that don't understand // Cache-Control Header("Expires: " . strftime("%c", time() + %i)); // Same as the %i above. If you're going to take that route, make sure to place that above the session_start() line, otherwise your headers won't take effect. (I've tried it before - one file sending the Cache-Control header out, and another attempting to override it. The new one never went out.) Chris > > Thanx in advantage, > Rainer. > rainer.schreiber@chello.nl > > > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.dev (#67588) next »