Welcome to WebmasterWorld Guest from 54.146.217.179

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Why do I NOT get the "Page has expired" warning?

Clicking Back button to a page that was submitted from a POST form

     
11:21 am on Mar 20, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 17, 2003
posts:86
votes: 0


Normally, when you submit a form to a page using the POST method, and you subsequently use the browser's back button to navigate back to that page, it comes up with the standard warning "Page has Expired... To resubmit the information click the refresh button". I understand why that happens - the page resulting from a POST submission becomes immediately stale.

BUT... on one of my sites this isn't happening and I can't understand why. I can click Back and the page displays just fine. I don't want that to happen as I want to generate a unique transaction ID each time that page is displayed.

The page is submitted via POST to PHP_SELF but I've tried submitting it to a different page and that makes no difference.

Has anyone come across this problem before? I've been scratching my head for hours.

12:10 pm on Mar 20, 2005 (gmt 0)

New User

10+ Year Member

joined:Feb 23, 2005
posts:11
votes: 0


Is the following in the code where you don't get the warning:
session_cache_limiter("public");
This is a common cure people who don't want the message use.
12:19 pm on Mar 20, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 17, 2003
posts:86
votes: 0


No.

Having investigated a bit further I think it may be something to do with the fact I'm using mod_rewrite on that site. I've just looked at another site that uses mod_rewrite and their form results pages are cached too. Need to do a bit more investigation.

12:23 pm on Mar 20, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 17, 2003
posts:86
votes: 0


Actually, the same behaviour can be viewed on this webmasterworld site, which I'm presuming from the urls is also using mod_rewrite.