Given is a form that is followed by a confirmation page where you have to confirm you entered data of previous form. Now if the user refreshes this recapitulation page, the data form the previous form reposts. Is there a way to prevent that in JavaScript?
I know its not a ideal solution, it should happen on the server side. But i have no choice in this case.
You can’t prevent the user from reposting using javascript. This should be done server side using the redirect after post pattern.
UPDATE
A possible but not robust solution is to simulate the redirect from javascript using
window.location.href.