URL query won't clear

I can’t get the url query to clear once it has been set once. For example, say I navigate to the home page and add a query:

wixLocation.to(“/home?id=001”);

and then I navigate to the My Saved Homes page without a query:

wixLocation.to(“/my-saved-homes”);

for some reason, the query string stays, as in the url is: www.offerreddy.com/my-saved-homes?id=001

I want the query to go away, but it just hangs on. Any ideas how to get rid of it when I navigate to a new page?

Does anyone know how to clear out the query? Thanks in advance.

Eric, it is impossible in Wix Code. Many of us have ran into the same problem, it leads to unexpected results, the query-string gets attached to everything on your page with a URL, but there is NO WAY to reset it, you can only ADD to it during a session.

Ok, thanks. That is unfortunate.