get url without parameters javascript

Solutions on MaxInterview for get url without parameters javascript by the best coders in the world

showing results for - "get url without parameters javascript"
Emily
05 May 2017
1window.location.href.split('?')[0];
Ethan
23 May 2018
1let urlWithOutParameters = window.location.protocol + "//" + window.location.origin + window.location.pathname;
2let urlWithParameters = window.location.href;