Cordova API Offline

2

I have a question, I've done some research, but I do not find anything concrete and I do not know if what I want to do is possible. So I would like to know if you can help me?

I'm putting together an app that will consume a Rest API for product listing. I need to make it on the first access it put these cached items to consume when it is offline. Can you do it? Can you help me with some examples or links where I can get some examples to better understand how to do?

    
asked by anonymous 27.03.2018 / 03:38

1 answer

0

What you are looking for is the apache-cordova plugin for localStorage .

With localStorage you have a local database in your app, so you can load the data you mentioned in this local database and access and edit them at the most convenient time.

This Link is the documentation of how to use the localStorage native of apache-crodova .

This other link , shows other Storage options, also native to the apache-cordova .

All of the above, work with the device's native storage.

I use a more advanced solution with SqLite, which is a proprietary database for mobile applications . I like it because the other options can limit the size of my storage, since the SqLite this resource management is better.

This plugin is very good, it is also indicated on the apache-cordova website.

    
27.03.2018 / 22:14