Re: Sessions - going back in browser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Craig Donnelly <craig@xxxxxxxxxxxxxxxxx>:
> I had an issue that I needed to be able to go back in the browser while in a
> session without getting "page has expired", I was reading through the manual
> and came across a comment about adding the following to the sessions page to
> allow users to traverse back:
>
> header("Cache-control: private");
> (http://www.php.net/manual/en/function.session-start.php)
>
> This works fine on a Win32 dev box running Apache 1.3.x and PHP 5.0.3, but
> then I loaded the pages onto a RedHat box running PHP 5.0.3 on Apache
> 1.3.27.  This box is running these pages through SSl (https)
>
> Anyone any ideas?

This is a standard issue with browsers and the HTTP protocol. POST
operations are supposed to contain dynamic data, and thus, by their very
nature, pages returned from such a request are supposed to contain
content that should rightfully expire.

Of course, in many situations, this expiring is not desired.

Basically, you have to fool the browser into thinking that the way you
got to the page was NOT via a POST operation. One standard way of doing
this is to have a middle page that processes the POST request, stores
some relevant information, and redirects to the final page that displays
the results. Hitting the back button in this scenario takes you back to
the first page.

Chris Shifflet has a great tutorial on this; google for his name and
'page expired'.

-- 
Matthew Weier O'Phinney           | WEBSITES:
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org
mailto:matthew@xxxxxxxxxx         | http://vermontbotanical.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux