# 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:** 1\
**Showing post:** 2

<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!

---

_[View the full topic](https://community.glideapps.com/t/how-to-persist-user-navigation-state-across-sessions/78753)._
