HTML5 Local Storage

Has anyone worked with the HTML5 local storage functionality. I am needing to put together an app that will allow people on devices without a network connection to see some data on there mobile device.

I am pretty sure this isn’t possible to do with a regular Xojo web app, but I already have a Xojo app that does what I need, so I was thinking of hooking up some kind of handleURL backend to deliver the data from the existing database to the browser when they connect with the regular app and then have it display that when they are offline.

I just started looking into this and was just wondering if anyone has already been down this road and might have some pointers.

You would have to package that with an HTML/JavaScript UI. If your database is not too complex, it looks reasonably easy.

The tricky part will be to send your user to the HTML page. I would do that in HandleURL, but you will have to manage the session somehow, since it is not available there, and you have to assume the current session will die after 3 minutes of inactivity once the customer is gone from the UI app.

What is less evident, is how to synchronize the local storage with the server data when connection returns. Plus reconnect the user to a new session with his credentials.

My thoughts were to make a page that tries to connect to the server to load the latest dataset. If that works, then after loading the dataset in local storage it simply redirects to the regular app. If it can’t load the current dataset it would display a read only version of the dataset it has, or if it has none it would display a message to the user explaining the current status.

That is simpler.