Idea: persist liveview state across reconnections

I’ve done this, but had to separate the user input vs server calculated portions.

For instance, settings are pulled from ETS based on a guid stored in a cookie.

But if the user was inputting something, form recovery must be used as if they disconnect, we don’t want to overwrite what they were doing with the server state. The full state is reconstructed with the form recovery and some expensive data stored in the cache.

So yes, it can be done, just have to be careful in merging the user state with the server state.

1 Like