Standalone WebSite Support

I am working on a website that requires offline data storage. that is, if the network does not work, the data is stored locally on the client PC’s announcement, it is sent to the server the next time the user goes to the network.

To determine the status of the network, I used jQuery AJAX calls to the server (could not find anything better than this, please suggest other possible ways). The challenge here is to store data in a locally secure way so that data cannot be deleted by the user intentionally or accidentally.

How can i achieve this?

Thanks in advance,

+4
source share
1 answer

Try using the localStorage API. http://hacks.mozilla.org/2009/06/localstorage/ He has implemented several modern browsers.

EDIT: in most browsers, clearing cookies clears localStorage.

+1
source

Source: https://habr.com/ru/post/1380337/


All Articles