A r t i c l e s
Navigation

Note: This Wiki is
outdated, personal views
may have changed.
L505 A.I. bot is dead
long live THX 1138

M a i n P a g e

D i r e c t o r y

Session vs Cookie


Difference between a cookie variable and a session variable:

Sessions

A session variable is used to keep track of user state, or user information/details applying to the current session or time period. Memory or files (or database) is used to keep track of the information for a specific period of time, i.e. 20 minutes, 2 days, etc.

Once that user has been dormant or inactive for over 20 minutes, the session is ended, and dropped from the memory. Then the user is logged out, along with any other expirations you wish to implement.

Cookies

On the other hand, cookie variables are stored for longer periods of time. Cookies can be used with sessions strategically, such as when you need to attach a user to a certain session.

About
Note: This Wiki is outdated, personal views may have changed.

This wiki contains info on life, health, humans, nature, programming, database, fads, paradigms, poems, principles, theories.

Articles may contain statements which some may find helpful and encouraging, or even discouraging.

Beware, I believe in the Grand Justice system.
_ _ _