Now in my application cookies for users are generated in a certain format containing userID. I want my cookie to be generated randomly after every login so even if cookie were stolen once they would never be used forever by a hacker.
What is the best practice of handling cookies this way? How should I store/retrieve them(hashtable/datastore...)?
Thanks
You can try following parameters:
Join it into one string (like 13413:1826271762:b026324c6904b2a9cb4b88d6d61c81d1
) and store it into a cookie like USERID
.
On every request you need: