Page toggling (client-side or server-side callbacks?)

Hi,

I’m building a multi-page Dash app and currently tracking URL changes to switch between pages using a server-side callback. For content updates, though, I’m considering preloading certain static components (that don’t require querying a data service) so I can use a client-side callback for a snappier UI experience.

Once the basic layout is shown, I’d then load more detailed or dynamic content via server-side callbacks.

Has anyone implemented a similar approach or have recommendations on best practices here?

I have done something similar in the past. As long as the amount of data is not huge, I would recommend the approach of preloading, and delegating the routing to a client side mechanism. That way, you get better performance, and decreased load on your server :blush:

1 Like