✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

dcc.Location multiple identical callbacks until browser refresh

I’m using the first example at https://dash.plot.ly/urls, with the only addition “print(pathname)” as the first line of the display_page function.

For every time the app is restarted (killed+restarted in terminal, or file simply saved and app hence hot-reloaded) the path is printed n+1 times with the same value.

App start
Click on “Navigate to /”

App restarted
Click on “Navigate to /”

and so on for every restart.

When I hit the browsers refresh-button it starts over with printing just once per click again, with n+1 prints per app restart.

A bit odd and would mean that a potentially large app would be (re-)loaded many times in rapid succession. Me missing something here?

I did (honestly) search the forum but wasn’t able to find any similar case.