Settings

Theme

Ask HN: Offline mode for SaaS

2 points by blaco 12 years ago · 2 comments · 1 min read


im planning to build a SaaS, my potential clients will generate transactions every 15 minutes or so, they also have very weak internet links cause they dont live in the city, so it could be the case that internet is down for more than 30 minute. I guess the solution would be to build an "offline" mode, but im not quite sure how can i do that or where should i even start, any pointers in the right direction would be appreciated.

thanks, B.

labpdx 12 years ago

For posting data, you could check connection status (or $.ajax error callback) and if the client cannot access then store the data locally using localStorage [1]. When the connection becomes available again then post all data from localStorage to the end-point and clear out local store.

[1] http://www.w3schools.com/html/html5_webstorage.asp

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection