get url without parameters javascript

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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;