Difference from Storage and Native Storage

I used both @ionic-native/native-storage and @ionic/storage in my app and they all work as expect.
I can not figure out what is the main difference between them. All of them have key/value system and similar functions. Can some one please explain to me in detail.
Thanks alot.

Ionic-storage is more flexible in that it can employ multiple backend drivers and will also work in browsers. Native-storage will only work on devices. I know of no situation in which native-storage is preferable.

Thanks for the reply but i tested native-storage in browser and it works well. It also support all OS.

You mean with ionic serve? That would surprise me.

Yeah. In document of nactive-storage also have browser support

In my experience, that’s not the same thing. That’s cordova’s “browser” platform, which is separate from the browser environment one typically deals with when running ionic serve.


Maybe i have some confusion here. Let’s me take a test again. I will comeback with the result

After test native-storage in browser, it really does NOT work. Sorry about my mistake. Now we can say, the most advantage of ionic-storage is it can work in browser, right?

1 Like

How about performance? What solution give more performance?

I don’t think anyone has done good tests on that yet.

A post was split to a new topic: Native storage, local storage or sqlite?