0

I am building an app with Angularjs 1.5.3, Cordova 6.5, and Ionic 1.3.3. I am using localStorage so the app can be used offline. Does the contents of localStorage have any affect on updating an app from the app store? I want to wipe local storage if a user logs out of the app.

Olian04
  • 6,480
  • 2
  • 27
  • 54
user1261710
  • 2,539
  • 5
  • 41
  • 72

2 Answers2

0

I suggest to use sqlite for persistent storage. You cannot rely on localStorage and cache handling by the browser to retain your data.

Effective clearing should be handled through lifecycle hooks.

Regards,

Tom

TomG
  • 597
  • 5
  • 12
-1

Please take a look at answer to this stackoverflow question.

Also you may consider using sessionStorage that has the same API, but is cleared when app/browser/tab is shutdown.

Andrzej Smyk
  • 1,684
  • 11
  • 21
  • 1
    Please [avoid link only answers](http://meta.stackoverflow.com/tags/link-only-answers/info). Answers that are "barely more than a link to an external site” [may be deleted](http://stackoverflow.com/help/deleted-answers). – Quentin Oct 05 '17 at 16:27