Storage

Storage

Several storage APIs are available for Cordova applications. See html5rocks storage overview and tutorial, for a more complete overview and examples.

Each API offers advantages and disadvantages, which are summarized here. You should choose whichever best suits your needs. You can also use several different approaches within a single application for different purposes.

LocalStorage

Local storage provides simple, synchronous key/value pair storage, and is supported by the underlying WebView implementations on all Cordova platforms.

Usage Summary

Local storage can be accessed via window.localStorage. The following code snippet shows the most important methods