i have a 2 pages app, on the first page (app.py), i use dcc.Store to store a value in the session cache, and then trying to load this data in the 2nd page (app2.py), and show it as html.H1.
So, I’m not an expert on multiple pages app, but I suppose you are displaying your pages like in this example https://dash.plotly.com/urls ?
If you do, I think your problem is that you only have on page loaded at a time, so once you have loaded the second page, your first doesn’t exist anymore, so to speak, and you can’t access any element in it.
A solution would be to put the store in your main layout, like this:
app.layout = html.Div([
# represents the URL bar, doesn't render anything
dcc.Location(id='url', refresh=False),
dcc.Link('Navigate to "/"', href='/'),
html.Br(),
dcc.Link('Navigate to "/page-2"', href='/page-2'),
dcc.Store(id='session', storage_type='session')
# content will be rendered in this element
html.Div(id='page-content')
])
It should now be accessible by the two pages.
Hope this was helpful!