Phonegap Sqlite, WebStorage, LocalStorage. Which one of?

I am learning to convert a mysql database to a phonegap application.

Now with HTML5 there is a specification for Web Storage (is it usually called local storage?) This is what I believe Phonegap uses the / api storage method. What will be the correct pairs of key value strings?

But I am reading this tutorial, and he continues to mention Phonegap and Sqlite as a built-in api. It uses the correct SQL syntax.

What is originally used?

Sorry, if this is very confusing to read, it is very difficult for me to think.

+4
source share
1 answer

According to the phone book documentation:

This API is based on the W3C Web SQL Database specification and the W3C Web Storage API specification. Some devices already provide an implementation of this specification. For these devices, built-in support instead of replacing it with an implementation of Cordoba. For devices without storage support, the Cordoba implementation must be compatible with the W3C specification.

Phonegap allows you to intercept so you can access various storage options on the device. As far as I understand, the term localstorage object is an HTML function in which a web browser stores information, and this is a bad option for storing data, since I saw that it is cleared every time the application is restarted.

On the other hand, if you use a database object, it remains even after the application is restarted.

Local storage http://diveintohtml5.info/storage.html

Phonegap http://docs.phonegap.com/en/2.3.0/cordova_storage_storage.md.html

0
source

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


All Articles