How do I reload the page without the query parameters?
window.location = window.location.href.split("?")[0];
There are a few ways to go about it:
window.location = window.location.href.split("?")[0];
Or, alternatively:
window.location = window.location.pathname;