0

Does anyone know if you can clear an indexeddb in Intel XDK? I know that you can update the db version to change it, but it would be nice for dev purposes if you could clear it.

I know you can do this in chrome by going to "settings" - "All cookies and site data" and then finding the site and clicking remove. Is there something similar for xdk?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Possible duplicate. Intel XDK uses JS, CSS, and HTML. So you should be able to use JS to solve this problem. This may be what you're looking for: http://stackoverflow.com/questions/15861630/how-can-i-remove-a-whole-indexeddb-database-from-javascript – Daniel Brown Sep 15 '15 at 12:47
  • @DanielBrown is correct -- the XDK builds Cordova apps, so your app runs inside of a "webview" -- which is like an embedded browser. In general, most of the rules of a browser apply to a webview. On Android you should use the Crosswalk option, because the stock Android webview on Android 4.x devices is very old and limited in features. – xmnboy Sep 16 '15 at 14:27
  • Yeah, that should totally work too. Was originally thinking of manually deleting it :). – user5336333 Sep 16 '15 at 15:10

1 Answers1

0

Yes. You can use indexedDB.deleteDatabase() in the XDK the same as in a browser as described here. It should work in the Emulator and App Preview (and Debug tab) as well as in your final app, should you need it there.

Community
  • 1
  • 1
OldGeeksGuide
  • 2,888
  • 13
  • 23