lional Posted October 9, 2008 Share Posted October 9, 2008 When using sessions for the shopping cart, if the user presses the browser back button the previous page is not displayed only a page that says that this page has expired. How do we fix this? Link to comment https://forums.phpfreaks.com/topic/127741-back-button-on-browser/ Share on other sites More sharing options...
DarkWater Posted October 9, 2008 Share Posted October 9, 2008 Is it after they did some operation with a POST form? >_< Link to comment https://forums.phpfreaks.com/topic/127741-back-button-on-browser/#findComment-661084 Share on other sites More sharing options...
lional Posted October 9, 2008 Author Share Posted October 9, 2008 yes Link to comment https://forums.phpfreaks.com/topic/127741-back-button-on-browser/#findComment-661086 Share on other sites More sharing options...
PFMaBiSmAd Posted October 9, 2008 Share Posted October 9, 2008 Read the post at this link on how to prevent the browser from thinking it is supposed to resubmit form data when you navigate to a page that was the target of the action="..." parameter of a form - http://www.phpfreaks.com/forums/index.php/topic,220212.msg1009876.html#msg1009876 To the best of my knowledge this cannot be fixed using headers because headers only control the caching of the page, this problem is due to the browser caching form data and attempting to figure out when it should resend that data. This can be turned off in the browser settings, but that is out of the control of what you can do from anything on the server or in the web page in the browser. Link to comment https://forums.phpfreaks.com/topic/127741-back-button-on-browser/#findComment-661091 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.