kre8 Posted July 27, 2009 Share Posted July 27, 2009 I'm currently building a multi-page form for a project and am having some difficulty with the webpage has expired and ie8. Previously i have used ini_set('session.cache_limiter', 'private'); however the problem with this is that the form pages are then cached by ie8. For example, say data is submited on page 1 of the form, its processed and user redirected (via header("Location:")) to page 2 (both pages are actualy form.php, just with a page var passed inside the form). If the user then clicks on the menu shown on page 2, they are taken back to page 1, however the cached copy of page 1 is shown, without the latest data just inputted by the user. They must ctrl+refresh to view the latest data which is far from user friendly. Is there a recomended method to avoid "webpage has expired" warnings and prevent caching of such forms at the same time? Any help would be much appreciated Cheers Quote Link to comment https://forums.phpfreaks.com/topic/167637-wepage-has-expired-best-practice/ Share on other sites More sharing options...
Daniel0 Posted July 27, 2009 Share Posted July 27, 2009 Just generate the form again and output the values directly into the form elements instead of relying on the browser history. Quote Link to comment https://forums.phpfreaks.com/topic/167637-wepage-has-expired-best-practice/#findComment-884056 Share on other sites More sharing options...
kre8 Posted July 27, 2009 Author Share Posted July 27, 2009 Just generate the form again and output the values directly into the form elements instead of relying on the browser history. Thanks, Unfortunately that's what im currently doing and indeed is the start of the problem. I'm not sure i explained it fully in my first post, but take the following example... form page 1 is shown, and user enters their data, however one of the data items they entered is invalid so we show an error message and display the form again inline, allowing them to correct their error. The problem occurs if the user navigates away from this inline error/form page via the nav menu, and then clicks back in their browser, they get the webpage has expired message. Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/167637-wepage-has-expired-best-practice/#findComment-884068 Share on other sites More sharing options...
Daniel0 Posted July 27, 2009 Share Posted July 27, 2009 Well, that's the users own fault for leaving the page. It's then up to the browser to decide the best course of action should the user use their browsing history to go back again. Two browsers may handle it differently, and as far as I know there is no standard determining what to do in that case. Quote Link to comment https://forums.phpfreaks.com/topic/167637-wepage-has-expired-best-practice/#findComment-884070 Share on other sites More sharing options...
kre8 Posted July 27, 2009 Author Share Posted July 27, 2009 Well, that's the users own fault for leaving the page. It's then up to the browser to decide the best course of action should the user use their browsing history to go back again. Two browsers may handle it differently, and as far as I know there is no standard determining what to do in that case. Ok thanks, i thought thay may be the case. I should also mention i'm using client side scripting to validate the form before POSTing so it should eliminate the majority of server side inline error reporting. Was just curious if there was a better way to handle those with js disabled and hence server side validation only Quote Link to comment https://forums.phpfreaks.com/topic/167637-wepage-has-expired-best-practice/#findComment-884079 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.