ferrari Posted November 2, 2012 Share Posted November 2, 2012 When reloading the page with Firefox, it does aim to "repeat the action" - which means send "the search", or "the order confirmation" one more time. The question is, is this beneficial in contrast to having the cache emptied? In which forms may this be beneficial, if so? Which approach may be beneficial for dynamic pages? Quote Link to comment https://forums.phpfreaks.com/topic/270185-firefox-reloading-the-page/ Share on other sites More sharing options...
Christian F. Posted November 2, 2012 Share Posted November 2, 2012 (edited) If you're talking about people pressing "F5" after submitting a form, then you'll need to use a header () redirect after successfully saving the data. For searches this isn't too much of a problem, but you can save the result and then use a search ID in the redirect. However, for other stuff like order confirmations, registration forms and the like, then you need to stop the refresh from re-submitting the form. Quick example of how I'm doing it, in my scripts: http://pastebin.com/r0QpiRWX PS: One part of your post didn't make a whole lot of sense, "having the cache emptied" how..? In any case, that's not going to stop the F5-resubmit problem. Edited November 2, 2012 by Christian F. Quote Link to comment https://forums.phpfreaks.com/topic/270185-firefox-reloading-the-page/#findComment-1389590 Share on other sites More sharing options...
Adam Posted November 2, 2012 Share Posted November 2, 2012 Just to add, searches should be a GET request anyway. You shouldn't need to POST anything to perform a search. Quote Link to comment https://forums.phpfreaks.com/topic/270185-firefox-reloading-the-page/#findComment-1389701 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.