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!
You can't refresh without the warning; refresh instructs the browser to repeat the last action. It is up to the browser to choose whether to warn the user if repeating the last action involves resubmitting data.
You could re-navigate to the same page with a fresh session by doing:
window.location = window.location.href;