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? 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 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. 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. Link to comment https://forums.phpfreaks.com/topic/270185-firefox-reloading-the-page/#findComment-1389701 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.