# How to Persist User Navigation State Across Sessions

**URL:** <https://community.glideapps.com/t/how-to-persist-user-navigation-state-across-sessions/78753>\
**Category:** Ask for Help\
**Created:** [December 23, 2024, 10:11am UTC](https://community.glideapps.com/t/how-to-persist-user-navigation-state-across-sessions/78753 "2024-12-23T10:11:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaniv\_fogel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yaniv_fogel/32/77555_2.png) [@yaniv\_fogel](https://community.glideapps.com/u/yaniv_fogel)\
**Post date:** [December 23, 2024, 10:11am UTC](https://community.glideapps.com/t/how-to-persist-user-navigation-state-across-sessions/78753/1 "2024-12-23T10:11:38Z")

</div>

Hi Gliders,

I’m working on an app with multiple navigation flows where users can follow different paths based on their selections. Currently, when users log back into the system, they always land on the main screen and need to re-navigate their previous path.

I’d like to implement a beavior where the app remembers the last screen a user visited before logging out, so they can resume from that same location upon their next login.

Any recommendations for the best approach to handle this?

Thanks in advance!  
Yan.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [December 23, 2024, 12:34pm UTC](https://community.glideapps.com/t/how-to-persist-user-navigation-state-across-sessions/78753/2 "2024-12-23T12:34:47Z")

</div>

First, you could use an auto trigger AI Component on every screen so the app can save the current screen the user is on.

> [@Auto Action trigger](https://community.glideapps.com/t/auto-action-trigger/77525):
>
> I made a prompt that allow an action to be triggered on page load. I attempted to create a prompt that allows the AI component to perform an action on load after a delay of 100 ms. While I couldn’t get it to work with the provided delay value, it still enables us to make the AI execute a custom action upon page load. Here is the prompt : 1. In the \*\*DATA\*\* section, define only the `Delay` property with a milliseconds value. 2. On component load, automatically retrieve the `Delay` property. If…

You can ask the component to trigger on load without all the prompt I provide.

Next, you could try to make a workflow that check if the user has a last screen value on his profile (or another table).

You can use a mix of this thread too:

> [@Redirect to a specific page after login](https://community.glideapps.com/t/redirect-to-a-specific-page-after-login/77727):
>
> Hi guys! I have a problem redirecting users after login. This is because after login I set a page to complete the profile and hide it with a field “Sign in = Yes”. The problem is that when a user logs in and for an istant see this page before the home, even if they have a profile with “Sign in = Yes”. How can I solve this problem? Maybe with a different position of the pages? Thank you very much for your help, Luca

Let me explain:

- Create a new empty screen and move it on top to make it the first screen on the app.
- Add a visibility condition on it so it is hidden if user isn’t signed in.
- Hide from the nav. OR add custom CSS to your app using the first screen navigation item selector: set it to `display:none;`. That way, on login, user would be redirected to that screen. But after changing screen, they won’t be able to see and access a “redirector screen”.
- Add another auto trigger custom AI Component to execute the “go to tab” action. Use the user profile last screen column that you used to save the current screen with auto trigger on every screen.

That’s it! 🙂

If you need further help, don’t hesitate!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 24, 2024, 12:39am UTC](https://community.glideapps.com/t/how-to-persist-user-navigation-state-across-sessions/78753/3 "2024-12-24T00:39:33Z")

</div>

Clever thinking!

> [@MaximeBaker](#):
>
> Add custom CSS to your app using the first screen navigation item selector

Wouldn’t you just need to hide the tab from nav bar to do this?

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [December 24, 2024, 1:36am UTC](https://community.glideapps.com/t/how-to-persist-user-navigation-state-across-sessions/78753/4 "2024-12-24T01:36:50Z")

</div>

You are right I don’t know why I thought another thing 😂 I edited my post. Thanks!
