Make the back button appears only when navigate between 2 apps

I have 2 apps, app1 and app2, there is a hidden back button in app1, which should be stay hidden till now,
From app1, I navigate to app2, doing some stuff, then navigate back to app1
now, I want the back button in app1 to appear.

my approach is updating the localStorage, when navigating back from app2 to app1, as shown, then the back button gets its value (false) from this localStorage and appers:

the problem is the localStorage remains as it's even if I refreshed the apps, so the back button stays appearing before the navigation between the apps

Well, I successfully made it by using the URL query strings in order to pass data from one page to another, I found it here:

https://docs.retool.com/docs/multi-page-apps

1 Like