8
In a new endeavor, I need a simple application to stay working if the internet connection is lost. Can someone explain to me how to do this?
I had thought to use HTML5’s persistence features in case of loss of connection, and somehow I still don’t know, to do a synchronization between the server and client databases when the connection is recovered. But here’s the question. How to do this using Rails?
I found some examples, but with static files referenced in the Html5 cache manifest... I don’t know if it would be the same in Rails. I haven’t tested it yet :(
Any idea?
This cache manifest is for the pages themselves (HTML/CSS/JS) to continue working if the connection drops. You’ll need this also. As for a bank that keeps running offline, perhaps the Pouchdb serve for what you are wanting (source: that comment by Gypsy Morrison Mendez in a related question). I never used, but it seems to do exactly what you want: use offline in the browser and sync when online.
– mgibsonbr
It is a good question, in the company where I work we are thinking about it too, but so far the only alternative found was to rewrite the system as a js application.
– Anderson Danilo
Thought this Railscast screencast might help you ! Link to the screencast
– Adriano Carvalho