Have you tried:
window.location.hash = '';
We use one web page for our web application, and some functions (change of currency, language, etc.) can cause a reboot.
If you want to prevent republishing, you can use a cookie to prevent the server from doing duplicate work.
source share