user847495 user847495 - 1 year ago 59
HTML Question

In Javascript, how do I reload the page without the query parameters?

Let's say I want to reload

www.domain.com/abc?num=4


But I want to reload
www.domain.com/abc
ONLY (without everything after the question mark)

Answer Source
window.location = window.location.href.split("?")[0];