Save & restore Session


I wasn’t able to find anything in the user manual about saving and restoring the state if i close and re-open my osjs session.

Can you point me where i can find a way to do that and how many ways are there to store session



Do you mean in an application you’re developing ?


If that was the case, I’ve added it to the application tutorial:


Ops, I had some errors there. So if you’ve already looked at it – do a hard refresh of the page!


If I close my chrome browser tab within which my os.js was running and i reopen it then i want to restore all the applications that were previously opened within os.js. I read in your manual that currently this is done by using browser local storage but it is not recommended for production as it has memory leaks. I wanted to know if this session can be stored say in a database like oracle or something else and where/how to do this kind of configuration.


Currently your session is only stored when you save it from the menu. Rolling session updates is supported, but has not been added to the applications yet.

You can see it’s on my TODO list here:

Yes, it can. However, I have not published the modules yet (only the authentication ones as of now). This is also on the TODO list.

I’ve already created the manual on how to change the functionality:

Might actually publish that one today. I’ll let you know.


I just realized I forgot to update the included fs module, so I’ll fix asap as well :blush:


Well, I published the database storage module:


I’ve fixed this as well, so run npm update to get the latest @osjs/server :slight_smile:


I’m going to translate this into a authentication adapter as well so there’s an identical solution for that too.

Currenty there’s only the standalone sqlite module, which will probably be deprecated after this.


Published as well :blush:


Cool! Thanks! I will do the update and check out the new module. Will get back to you in case i have any questions.