I am appending a query parameter to a search page url like ?dest=india.
This works well for the search page… but when i navigate to anyother page in the website, the query parameter ?dest=india is stuck on all the urls. This is really frustrating as i have done a lot coding for this, only to encounterthis issue… i really need to get this thing fixed can anybody help me with this.
You can do the following:
On the relevant page - retrieve the parameter.
Then write:
import wixLocation from 'wix-location';
let destination = wixLocation.query.dest;//do what ever you want with it
wixLocation.to("/current-path?dest"); //It'll remove the params when you navigate to the next page
However, If you click back, it’ll behave as if there are 2 pages, first then one with the params and then the other without it;