You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a Blazor Interactive Server web application (using .NET 8). My biggest problem is that if a tab with my application is left open in the background (say, a user navigating on a mobile device closes their screen), the connection to the server is lost, and the circuit is closed (thus, the frontend can no longer reconnect). Then, when the user comes back, they have to reload the page (either manually or it can be done automatically using JS) for a new circuit to be created and a new connection established. However, reloading degrades user experience, and I don't consider it a viable long-term solution.
I am thinking about two options to fix this:
Store the circuit state in the browser's local storage or an SQL server database, and when the user comes back, try to recreate the same circuit on the server and connect to it (the frontend should still have its ID) -- via a set of client-side requests, as it is done when initially negotiating the connection
If the first, ideal solution does not work, create a new circuit in the backend and connect to it without reloading -- it is expected and accepted that with this approach, the state of components will be reset, and the state of inputs and other components will have to be stored and handled separately
Has somebody done something like this before? Is it doable? Please let me know if you have some pointers for setting up this mechanism.
P.S.: I've had a discussion with @surayya-MS about this at the Update conference in Prague, and she told me that @danroth27 and @MackinnonBuck could help.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
I am working on a Blazor Interactive Server web application (using .NET 8). My biggest problem is that if a tab with my application is left open in the background (say, a user navigating on a mobile device closes their screen), the connection to the server is lost, and the circuit is closed (thus, the frontend can no longer reconnect). Then, when the user comes back, they have to reload the page (either manually or it can be done automatically using JS) for a new circuit to be created and a new connection established. However, reloading degrades user experience, and I don't consider it a viable long-term solution.
I am thinking about two options to fix this:
Has somebody done something like this before? Is it doable? Please let me know if you have some pointers for setting up this mechanism.
P.S.: I've had a discussion with @surayya-MS about this at the Update conference in Prague, and she told me that @danroth27 and @MackinnonBuck could help.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions