We are seeing a lot of warning logs like this:
navigate event to "https://someurl" failed because you are redirecting across live_sessions. A full page reload will be performed instead
There are cases where it is difficult to determine whether to use navigate or href.
- A navigation bar that contains links to views in multiple live sessions (e.g. because of different authorization- or CSP-related security contexts).
- A LiveView that receives a
return_toURL as a parameter, which may lead to a different live action in the same view, or a view in the same live session, or a view in a different live session. - A LiveComponent that links to a particular view that may or may not be in the same live session, depending on the view in which the component is rendered.
In either case, using navigate by default in the component will lead to the warning log when navigating to a view in a different live session. Using href by default will cause unnecessary full page reloads and degrade the user experience. Switching between navigate and href dynamically requires the component or view to resolve in which live session the current URL is and which URLs will lead to the same live session.
I can see that this warning might be useful in a development context, but since the switch to a full page reload is done automatically anyway, and dynamically choosing between navigate and href is not always feasible, this log is not very actionable and just increases the log volume.
I’d like to suggest to either remove the log completely, or to add a configuration option to disable it (maybe you’d want it in dev, but not in prod).






















