Google News
logo
Ionic - Interview Questions
How would you save data in an Ionic app so that it can be accessed later or on the next launch?
The ionic framework provides a storage module that resides in @ionic/storage package. The storage module allows us to store key-value pairs and JSON objects in secure, reliable storage. It also has its own set of limits.
 
Storage has a variety of storage engines, which one is best depends on the platform you are using. When running in a native app context, the storage uses SQLite. When running on the Web or as a Progressive Web App, Storage will use IndexedDB, WebSQL, and localstorage.
 
The SQLite is the most stable and used a file-based database, which avoids the pitfalls of the other storage engines like IndexedDB, WebSQL, and localstorage.
Advertisement