I want to create and persist cookies to store some user info -- i.e. some of their preferences, their avatars, etc. I want these cookies to stay on user's computer till they're removed -- either by users or my app.
I use Facebook/Google authentication in my ASP.NET MVC app so I already use cookies but they expire when user ends his/her session.
What is the right approach to doing what I want to do? I can think of two approaches:
- Do not expire the cookie but change a value in it to indicate that the user's session has expired.
- Create another cookie with a different name that stores user info/preferences.
I wanted to see how others handled this.