Lost web server connection

From the client site
When I lose connection to the server there is no way to retrieve the data that was in browser memory in active open session.

Yes / No

You could have a timer save the current data in case of browser crash/timeout.

how i now is disconnect or crash to save data

The idea is to save the data regularly in case of a crash, and not wait for the crash to save the data. Most of the time, you will not require the data, so you only keep the latest set.

Upon reconnect, you devise a mechanism to retrieve the saved data and bring back the user where he was when he was disconnected. A dialog like “Your last session was abnormally ended. Do you want to resume? Yes/No” No simply continues the normal login, while yes retrieves the data and brings the user back where he was. This may be difficult to do sometimes.

You don’t. You save the data on the server as you go along.

To be fair, just about everything that a user enters is transmitted to the server, so taking snapshots to be able to restore failed sessions should not be too difficult.

hi Greg
to save like temp table with the session id and then read it back or how i do that.

[quote=348398:@Alexis Colon Lugo]hi Greg
to save like temp table with the session id and then read it back or how i do that.[/quote]

That depends on what you want to do. In Xanadu, our web app foundation, we just started to store the last page the user navigated to on their user record.

When the user navigates to a different page, we run an SQL update using their user ID to store the page name along with the record ID in a ‘LastVisited’ column. Then when the user re-connects to the app, we check their login via cookie or login form and then take them back where they last were.

I hope that helps! There’s a ton of ways to do this at different levels of detail, but this is a simple way.

Lots of phone apps do this too. You may have noticed that launching an app that took you where you last were…