Skip to content

Persist session storage on quit/start #312

@RangerMauve

Description

@RangerMauve

Some apps make use of sessionStorage as a way to store data in the current browser tab/window. It could be helpful to persist this when we quit the browser and restore it after.

I could see this being useful for stuff like text editors where you might have some in progress text. The current approach is to use localStorage, but that means two windows open to the editor would overwrite each other which may not be what users expect.

Steps

  • Modify WindowManager.saveOpened
  • get all they keys out of sessionStorage as a JSON object
  • Add a session field to the object inside urls
  • Modify openSaved, adding more JS to execute on DOM-ready (or maybe sooner?)
  • If the session object exists and is not empty:
  • Iterate through the keys in the object and call sessionStorage.setItem(key, value)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions