I have a URL with a long query string attached to it. After the page loads, I do not require the query string. So I want to remove the query string from the address bar with
I use this code snippit in my personal projects where i need to remove URL params without re-loading:
var newURL = location.href.split("?")[0]; window.history.pushState('object', document.title, newURL);