#Is it a good idea to use localStorage (server side) as a session store?

4 messages · Page 1 of 1 (latest)

median prawn
#

So far I could only find one limitation: the max size of the localStorage per module is 10mb. However that can be worked around with a web worker I guess. As a weekend pastime I'm working on a session management system for fresh, where the session id is stored in a cookie, and the session data is read back from a store by the id. Is there anything which would make localStorage a bad candidate for session storage?

ebon inlet
#

Is there a reason why you wouldn't just use a Map?

localStorage is really just an API for accessing data bound to a domain, so isn't really necessary in the Deno runtime

median prawn
#

That makes sense. However it would require some extra effort to persist the data across executions I guess. (e.g. restarting the server)

ebon inlet
#

yep