DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

Is there IndexedDB or localStorage for localhost or local file:// protocol?

I believe it is a no for all.

This is pretty much a killer for both

  • Neutralino.js (default browser webview with token-based auth localhost)
  • Lorca (Chrome DevTools protocol in app mode)
  • Even Electron or Ultralight, if you use localhost or file protocol... (of course, a fix might be to use custom protocol, like app://./)

So, is there an option at all, for convenience, without contacting the server API's?

Top comments (3)

Collapse
 
michaelphipps profile image
Phippsy

What's the use case? Standalone product on a local system, disconnected from the web?

I know nothing about neutralino, but storage is mentioned in the docs:
neutralino.js.org/docs/#/api/storage

Is that what you're talking about?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

I want a real database - e. g. pouchdb with indexeddb adapter -> rxdb, actually.

Use case is desktop app with Lorca or Neutralino.js

Collapse
 
michaelphipps profile image
Phippsy