Is it safe to use indexedDB in Electron?


Now we are converting a Web app to Electron app.
We are not sure whether it is safe to use IndexedDB in Electron as we did in our Web APP.
Is there situation we may lose the data in IndexedDB? Or is there something we need to worry about?

Please help.
Thanks very much.


To the best of my knowledge, Electron uses IndexedDB in the same way Chrome does and you should have no more difficulty with one than with the other.

I don’t know all the implementation details, but I do know that Atom uses IndexedDB to serialize its state beween sessions.


More specifically, We are worried about the data will be deleted when using electron auto-update. Do you know anything about this?



All I can tell you is that Atom uses that strategy and performs automatic updates without losing data. If you try it and find that your data disappears, you’ll have to ask an expert.


Ok, Thank you very much.
We will do some tests later.

Have a great day