In my client script I need to force the browser to navigate to another URL. I know this is done through the `window.location` object, but any single change to it results in immediate change of the window URL and hence makes the browser navigate to this URL.

I need to be able to change the query string and change a portion of the URL path. FF implements `URLUtils` which allows me to do that: <https://developer.mozilla.org/en-US/docs/Web/API/URLUtils> but this is not supported by other browsers:

```
var anchor = document.createElement("a");
anchor.href = "https://developer.mozilla.org/en-US/search?"

searchParams.append('q', 'URLUtils')
searchParams.append('topic', 'api');

// "https://developer.mozilla.org/en-US/search?q=URLUtils&topic=api"

window.location = anchor.href;

```

I need to achieve the same effect in other browsers. Any advice other than doing this manually on the string level? I would like to do it using the built in browser capabilities.