You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
local storage is getting cleared when closing the window. How to stop it? #5708
I am storing some information e.g. user name, email so on, in localStorage to access next time user will start my application but its gone if the user closes the window.
I am using localStorage from my angular app. Code is given below
@jlord I'm on Ubuntu 18.04 LTS and when I close the application normally by clicking the X button on the window and then relaunching the app, the local storage is gone. I've also built the app into a .deb and installed it, the local storage problem still exists.
Reacted by Johannes Millan, Aqeeb Imtiaz Harun, km, vegard elshaug almås and Crllect
@ramtinsoltani exactly that. I don't understand why the storage gets cleared completely. I would understand if the current changes would be thrown away. But clearing it completely doesn't happen in a normal browser.
Activity
jlord commentedon May 26, 2016
As mentioned #1731 (comment), localStorage's default behavior is not to persist after certain types of closes/crashes.
This is likely not an issue with Electron, closing out.
ramtinsoltani commentedon May 24, 2019
@jlord I'm on Ubuntu 18.04 LTS and when I close the application normally by clicking the X button on the window and then relaunching the app, the local storage is gone. I've also built the app into a .deb and installed it, the local storage problem still exists.
johannesjo commentedon Sep 14, 2019
@ramtinsoltani exactly that. I don't understand why the storage gets cleared completely. I would understand if the current changes would be thrown away. But clearing it completely doesn't happen in a normal browser.
johannesjo commentedon Sep 14, 2019
What actually helps is when I do the following: