I want to reload a page using:
window.location.reload(true);
But I receive the POSTDATA warning because the refresh function want to resend previous POST form data. How can I refresh my page without this warning?
UPDATED: I have no control of the project! I can’t workaround the POST itself!
Just changing
window.locationin JavaScript is dangerous because the user could still hit the back button and resubmit the post, which could have unexpected results (such as a duplicate purchase). PRG is a much better solutionUse the Post/Redirect/Get (PRG) pattern
Client Side
If you want to do it entirely client side, you’ll need to change the browser history before you do the refresh: