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
Description
Currently, mei-friend tracks all changes to the encoding, as well as most settings, layout options, etc. in the browser's local storage, so that the application may be reinstated after browser shutdown, etc. Unfortunately, this means that there is currently a baked-in assumption of a single current session. It would clearly be preferable if multiple concurrent sessions (e.g., working on multiple MEI files simultaneously in separate tabs) could be accommodated.
Proposed solution
Generate a unique identifier for each new session, defined when an encoding file is opened.
Prefix all local storage variables with this identifier, allowing multiple versions to exist in local storage simultaneously.
Use the browser's session storage to store the current session identifier.
When loading MEI friend, check for the existence of a session identifier in the session storage. I
if it exists, check for the existence of corresponding items in the local storage and load them
if it doesn't exist, or corresponding items don't exist in the local storage, offer the user a selection of known sessions (also stored in local storage) to load, or the option to start a new session.
This solution would allow multiple sessions to co-exist on the same machine.
Additional context
Whenever anything is written to local storage, it would need to be prefixed with the new session variable.
Note that local storage is only capable of storing strings, therefore serialization needs to take place.
The text was updated successfully, but these errors were encountered:
How shall we handle sessions initiated through a link with URL parameters?
Clicking on such a link will create a new window/tab and should therefore always ask for user input. If a previous session is selected to be restored, the URL parameter values should not be overridden.
If all you want is to allow multiple sessions to not step on each others’ toes, a better option than prefixing might be sessionStorage, which works identically to localStorage but is scoped to the tab and is cleared when the tab exits.
This raises another interesting issue with multiple sessions though: when a new tab is opened, with sessionStorage it would always start fresh. But even if this is not desired, when a new tab is opened, which session should it use?
Description
Currently, mei-friend tracks all changes to the encoding, as well as most settings, layout options, etc. in the browser's local storage, so that the application may be reinstated after browser shutdown, etc. Unfortunately, this means that there is currently a baked-in assumption of a single current session. It would clearly be preferable if multiple concurrent sessions (e.g., working on multiple MEI files simultaneously in separate tabs) could be accommodated.
Proposed solution
This solution would allow multiple sessions to co-exist on the same machine.
Additional context
Whenever anything is written to local storage, it would need to be prefixed with the new session variable.
Note that local storage is only capable of storing strings, therefore serialization needs to take place.
The text was updated successfully, but these errors were encountered: