page remembers last api call & re-calls on re-open

I have a Vue3 site designed to hold embedded tableau dashboards. When a user clicks a link on the menu page, a page opens that’s basically an empty shell. With the link’s props, I fetch a tableau token, construct the api call, and populate a div with the response. Starting a week ago, the site’s doing something new, and it’s happening the same on Chrome, Firefox, and Safari.

This is what happens now: the user clicks a menu link, frame page opens with requested report. If they return to menu and click new link, the frame page re-opens and immediately the page fires the api call from the previous visit. (There’s nothing in Store or cookies that saves the url the page constructs on-the-fly, so I’m not even sure where the browser is getting the full url for that re/call.) Since tableau’s tokens expire in seconds, this re/call fails — meanwhile, the page continues, constructing the new (correct) url+token and retrieving the requested dashboard.

So in the embed div, now there’s one dashboard reporting an error b/c the token expired — and if the user scrolls past that, they’ll see a second dashboard in the div, and this is the one they actually requested.

On top of all that, this ghost api call doesn’t change. If the first call was for reportA, and the user leaves-and-returns for reportB, the frame page calls reportA at the top. If the user leaves-and-returns now requesting reportC, the frame page still calls reportA at the top — and it’ll keep doing that even if the user revisits with a reportA request. The only way to clear it is by refreshing the page (and then it just starts all over again).

For now, I’m weaseling around the issue like so:

    created() {
      if (this.$cookie.getCookie('redo')) {
        console.log('B) remove cookie');
        this.$cookie.removeCookie('redo');
      } else {
        console.log('A) set cookie');
        this.$cookie.setCookie('redo', true);
        location.reload();
      }

Which is less of a solution and more of an unhappy hack to plug the dam while I figure out where all the water came from. What’s especially weird is when I backed up to a commit from before the problem first appeared, the site still does the ghost call. I’ve broken a lot of sites in a lot of crazy ways in my years, but I’ve never run into a case like this, and I haven’t the first clue how to solve it, because I haven’t the first clue what’s causing it.

Any and all help is greatly appreciated. /tears hair