query parameters won't go away -- even on menu links

Scenario – we have a number of pages that are loaded iframes from another subdomain. The HTML/iFrame Component doesn’t have a data connection (as far as I can tell). So I rolled my own “dynamic page” by using a single Wix page whose only body content is an iFrame component (plus header, nav, and footer).

To load a specific src into the iframe, query parameters are used when linking to that page. A $w.onReady() function uses wix-location to extract the query params and set the src on the #html element.

All that works fine

But for the rest of the session, the last query parameters hang around on the URLs. They even get embedded in menu URLs!

Is there a Wix Code way to “chop” them off? Or some JavaScript? Or is it browser dependent and some way to kill it there?

At the moment, it’s just annoying. But if I ever use query params for another function (not to mention filtering everything for analytics), it’ll have to be dealt with.

Thanks for any help with this.

Ken

It would still be good to know this … BUT I just tested another approach with a dynamic page instead.

The iframe source can’t be set with data. However, I use an onReady() function to grab the dynamic URL path (again, wix-location) and turn it into the src URL for the iframe component. Same result without the query params hanging around.