# Maintain route in general page module

**URL:** <https://community.developer.atlassian.com/t/maintain-route-in-general-page-module/45568>\
**Category:** Jira Cloud\
**Tags:** generalpages, ac-express\
**Created:** [February 25, 2021, 11:31am UTC](https://community.developer.atlassian.com/t/maintain-route-in-general-page-module/45568 "2021-02-25T11:31:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichardWattie](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@RichardWattie](https://community.developer.atlassian.com/u/RichardWattie)\
**Post date:** [February 25, 2021, 11:31am UTC](https://community.developer.atlassian.com/t/maintain-route-in-general-page-module/45568/1 "2021-02-25T11:31:52Z")

</div>

Hi, I’m creating an app use Atlassian Connect Express using hbs views. I’ve setup my app to be a general page and within that page I want to navigate to other pages (views). When I reload the page it redirects back to the main page which is defined in my atlassian-connect.json file.

How do you maintain the state so on a page reload it will retain the route the user was on?

I’ve tried to use the AP.history.pushState which appends a hash to the host url but within the iframe I am unable to retrieve this due to a change atlassian made in 2020 around iframe security.

Any solutions would be much appreciated.

Rich

---

<div class="post-metadata">

**Author:** ![hitsthings](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/hitsthings/32/46863_2.png) [@hitsthings](https://community.developer.atlassian.com/u/hitsthings)\
**Post date:** [October 27, 2023, 10:47pm UTC](https://community.developer.atlassian.com/t/maintain-route-in-general-page-module/45568/2 "2023-10-27T22:47:44Z")

</div>

Two years later, but I have an answer for you.

When the page loads again, on the client side you can call `AP.history.getState('hash')` to get the last value you called `AP.history.pushState(hash)` with on the previous load. Then you can navigate to that page in your iframe.

Unfortunately there is no server-side method I can find for this, which makes SSR pretty useless in a connect iframe.
