Page 1 of 1
Sessions -- more of an annoyance than a problem
Posted: Thu Dec 05, 2002 4:39 pm
by oldtimer
I am using sessions on some web pages and if you click on links no problem. Yet for awhile when you hit the back button you get
Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.
To resubmit your information and view this Web page, click the Refresh button.
You hit refresh and you have to hit the retry button.
Any way around this? After several minutes or so this is not a problem.
On some pages there is nothing more then session_start(); so there is no information being passed from a form.
Posted: Thu Dec 05, 2002 6:00 pm
by qiangxd
i have same problem. a friend told me to do it like this, you can give a try
Code: Select all
<?php
if(function_exists(session_cache_limiter)) {
session_cache_limiter("private, must-revalidate");
}
session_start()
?>
i have same problem. a friend told me to do it like this, you can give a try
Posted: Thu Dec 05, 2002 6:07 pm
by oldtimer
Your a life saver. Thanks that works great.
Jerry
Posted: Thu Dec 05, 2002 6:10 pm
by JPlush76
the best way is if you have access to your php.ini file
you can just go in there and change this line
; Set to {nocache,private,public} to determine HTTP caching aspects.
session.cache_limiter =
that way you dont have to include that code on all your pages

Posted: Thu Dec 05, 2002 6:22 pm
by oldtimer
So i change this
Code: Select all
; Set to {nocache,private,public} to determine HTTP caching aspects.
session.cache_limiter = nocache
to this ?
Code: Select all
; Set to {nocache,private,public} to determine HTTP caching aspects.
session.cache_limiter =
Posted: Thu Dec 05, 2002 6:43 pm
by hedge
Another method is to always end any response to a post with a Header command, usually back to the same page.
Posted: Thu Dec 05, 2002 6:47 pm
by oldtimer
When someone fills out a form i have redirects in place and I even have back links. But some people insist on using that back arrow button on their browser.
I tried the first responce and it worked. As this is my own web server I was able to go in thereafter and edit my php.ini and that worked as well.
Thanks all.
Posted: Thu Dec 05, 2002 10:23 pm
by JPlush76
oldtimer thats exactly right
give it a try

Posted: Thu Feb 06, 2003 10:11 am
by riley
Not sure which is correct, bring up an old subject or start a new topic. In this case I chose to continue this link.
Using the cache_limiter it has stopped the problem of the expired page when clicking the back button but has created a problem with the refresh button. Now when the data changes the page does not refresh with the new information. If I go to another machine the updated data is available. The only way to get the new info. on the original machine using IE is to clear the history and/or delete temp files.
Anyway to accomplish both back and refresh. I've tried public, private, nocache.