What should be stored in a session and what in a cookie? -


I'm thinking, are there any guidelines or best practice when using sessions and cookies? What do they want and what should be kept? Thanks!

These documents are good on security issues with session cookies, and how to get around them is .

  • In summary, you place a secret key on the server. With this key you can calculate a safe hash on the secret key, a time stamp, and any data you want in the cookie. You include data in secure hash, time stamp and cookie.

    When you receive a request, you can validate that you expect a signature so someone has compromised the cookie content.


    Comments

    Popular posts from this blog

    Is there an open source WebSockets (JavaScript) XMPP library? -

    java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

    iphone - How do I make a UIPickerView in a UIActionSheet -