Reply to Re: Sessions - going back in browser

Your name:

Reply:


Posted by Matthew Weier O'Phinney on 04/20/05 05:43

* Craig Donnelly <craig@deconstructor.net>:
> 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@garden.org | http://vermontbotanical.org

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация