How to get “Confirm form resubmission” when user trying to refresh browser
问题 I have a page that doesn't allow user to refresh the page by clicking browser refresh button or pressing F5. So I want to simulate 'form resubmission' in order to show prompt message. can someone guide me an approach to implement it? Is there any cross-browser solution available for that? 回答1: To refresh without getting the prompt the page must have been fetched using HTTP GET Make the form have method="GET" instead of method="POST" (and fix server processes to work with this change as