javascript remove parameters from current url

JavaScript
history.replaceState(null, "", location.href.split("?")[0]);
Source

Also in JavaScript: