Getting an indication of which page is currently being used and/or triggered a callback

When creating a multi-page app (through use_pages=True), I have not been able to find any variable which holds which page is currently open or which page triggered a particular callback. I’d like to be able to prevent some callbacks from running unless a specific page is selected.
Can anyone else think of a way of achieving that?

Hi @dashing-dash-dash Welcome to the Dash community :slight_smile: and I :heart: your user name!

You can add your own dcc.Location to app.py That will give you the URL that you can use in the callback.

1 Like