var url = window.href.split('?')[0]; //Или window.location.href.replace(new RegExp(window.location.search), ''); history.pushState(null, null, url);