Question about cookies maybe

When I go to a website and open or close menus, some sites remember what I left open or closed. I think it does that through cookies.

Is that something I can implement in perspective? At least one user mentioned that a desire to have some menus closed, while I know I like having all of them open so I can more quickly click where I want to navigate to.

So I wonder how to make the page remember our preferences.

I use my database for anything regarding persistent data for users and do so for stuff like this like allowing a user to set what their "home" view is.


What is the implementation you use?
Do they login or is it invisible?

Do your users have to login?

If so tie it session.props.auth.user.userName. if not perhaps try using the device identifier session.props.device.identifier

Maybe consider using a session started script to run a query that pulls in the users/device saved settings and write them to some property like session.custom.savedSettings

Then check against that custom property to do whatever it is you wish to do.


Right now, there is no login.
Been thinking about it.