Is it safe to use indexedDB in Electron?


#1

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.


#2

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.


#3

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

Thanks


#4

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.


#5

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

Have a great day