As described in my previous post, I will give you some more details about how you can access your cookies in a type-safe and easy way!
Update: Read the follow up post
The simplest way to do this is by using a little wrapper class like this one:
All you have to do is create a static property for every cookie that you would like to work with. As you can see you also have the Expires-times administrated in one single place!
Now you can access the values as seen below and you don’t have to worry about the cookie implementation-details in every place.
Of course, you can also use this same approach for working with session data or any other key-based collection.
Thanks for reading,