Update browser URL from within iframe

When using Jira Cloud apps, regardless of what happens inside of our iframes, the main browser URL remains the same (/plugins/servlet/ac/app-name/app-name).

If a user refreshes the page at any point, they’ll go back to the entry point for the app.

Is there a way to update the main URL from within the iframe? Ideally I’d just be manipulating the query string params (e.g. ?ac.pageId=5), so that when the app is refreshed, my app’s code can route the user back to where they were within my app before they refreshed.

Hi, @dpford,

There’s a JS API to do exactly that: https://developer.atlassian.com/cloud/jira/platform/jsapi/history/

Hope this helps.

1 Like

Perfect. Thank you so much!