简体   繁体   中英

Offline support of WebSite

I am working on a WebSite which requires offline storage of data. ie if the network is down the data is stored locally on the client's PC ad it is sent to the server next time the user goes online.

For detecting the network status I have used jquery AJAX calls to the server (Couldnt find any thing better than that ? please suggest other possible ways) . The challenge here is to store the data locally in a secure way so that the data cant be deleted by the user intentionally or accidentally.

How can I achieve that ?

Thanks in advance,

Try the localStorage API. http://hacks.mozilla.org/2009/06/localstorage/ It's implemented a few modern browsers.

EDIT: In most browsers, clearing cookies clears localStorage.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM