Failing_Solutions Posted January 31, 2012 Share Posted January 31, 2012 Forgive me if I'm in the wrong area, but not sure what forum this was most appropriate for. This community has always been the most helpful for me so I'm hoping I can find an answer. We have a form that uses multiple selects as filters for our products. Upon submission it retrieves matching products and displays a list. This all works great until you hit the "Back" button on IE 7/8/9 the page drops and displays the message "The Webpage Has Expired" which forces the user to have to refresh the page and click retry to get the page to reload. This is horrible behavior and a pain the butt for the user. We did find a work around which is declaring the page header private like this header( 'Cache-Control: private, max-age=10800, pre-check=10800' ); Which has served us well over the last year, however now we want to move the search functionality to our homepage in which we can't use a private header, its an online shop and the homepage (index.php) is the base url for so many sub pages. Is there any other way anybody knows to stop IE from throwing the webpage expired message? In my perfect world IE would stop being supported, and Microsoft would concede the browser market to FF / Safari / Chrome.. until then.. I must deal with this.. Your help is as always, very valued, and very much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/256134-ie-back-button-and-form-submittions/ Share on other sites More sharing options...
Failing_Solutions Posted January 31, 2012 Author Share Posted January 31, 2012 Well I managed to find a solution for this. In case anybody else runs into this problem.. By adding: BrowserMatch MSIE force-no-vary to your .htaccess file you can prevent IE from caching http pages thus resulting in no webpage expired messages when you hit the back button. It isn't suppose to work on https pages which is actually good news as this is where you want the page to be cached to prevent duplicate submissions of orders and such. Either make sure you test it on your server before running with it. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/256134-ie-back-button-and-form-submittions/#findComment-1313143 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.