0

I have started making desktop apps with Electron.I need to save some configuration into localStorage.I am using the latest version of Electron and I know that localStorage is supported.

Due to my previous experiences with my website I know that I have to check for localStorage support before doing something.

Do I need to do the same in Electron apps?

nicholaswmin
  • 21,686
  • 15
  • 91
  • 167
Manos Kounelakis
  • 2,848
  • 5
  • 31
  • 55

1 Answers1

3

No you don't - Electron is based on Chromium which has LocalStorage support for a very long time now.

Side note

In Electron, you can also read/write actual files using the file system which might be a better alternative for storing config files.

Since Chromium is not sandboxed when running in the way Electron runs it, you could also read/write actual text files just as you would in Node.js - This question explores those alternatives - or just go straight to using electron-config

Community
  • 1
  • 1
nicholaswmin
  • 21,686
  • 15
  • 91
  • 167