Change URL with applying the modified url parameters but not reloading the current page.
You can use the ‘searchParams’ to manipulate URL parameters.
If you what to set the new URL, you can use ‘window.location.href’ but in that case, you cannot avoid page refreshing.
But if you use, the ‘window.history.pushState()’ you can change the current URL without refreshing the current page.