Reputation: 3660
I have responsive web rails / html5 app that people access from the desktop and from mobile devices as well. In the event that my server went down, is it possible to allow my users to at least see their existing data still using HTML5 offline storage or some other method?
Lets say there are 20 relevant database entries, and then 10 of another table. Could I have it so when the user logs in, it syncs all those entries to a local cache so all the "show" actions would work even if the user was offline or the server was down?
What would be the preferred / best method to do this?
Upvotes: 0
Views: 94
Reputation: 14009
I suggest you have a look at this Railscast. You can use the local storage with
localStorage["key"] = JSON.stringify([...]);
var parsedItems = $.parseJSON(localStorage["key"]);
Upvotes: 2