Re: Cache

From: Date: Tue, 20 May 2003 21:15:35 +0000
Subject: Re: Cache
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-148326@lists.php.net to get a copy of this message
> If the client wants to > retrieve a wrong page (by using the back button, for > example), your script would detect this and nonetheless > serve the page you want to be shown. But the back button doesn't initiate a GET or POST. The server never sees it. --Frappy On Tuesday 20 May 2003 03:58 pm, Ernest E Vogelsinger wrote: > At 21:47 20.05.2003, Wendell Brown said: > --------------------[snip]-------------------- > > >Yup. The back button has ABSOLUTELY nothing to do with > > the cache. I can't see any way you are going to be > > able to do this with php. There is the possibility > > that it might be done with JavaScript but that question > > isn't for this list. :) > > --------------------[snip]-------------------- > > There _might_ be a way doing this with PHP if some > prerequisites are met: > > 1.a) Your pages are all serverd by the same URL path, say > "myscript.php". The actual content that's sent to the > client is determined by myscript.php. or 1.b) all your > pages are using the same module (perhaps by including the > same code) to determine it this is the right place for > the page to show, or to switch to another one. > > 2) You have some means of tracking your pages' state, > most probably using sessions. > > 3) You're site is transmitting the appropriate headers so > clients don't cache pages. > > You can then make a note within the session data space > which page to produce next. If the client wants to > retrieve a wrong page (by using the back button, for > example), your script would detect this and nonetheless > serve the page you want to be shown.

« previous php.general (#148326) next »