please tell me the differences between cookies and session variables. i am very confused with that.
difference between cookies and session variables
Collapse
X
-
Tags: None
-
Hi RamyaSrinath,
Basically the difference is that any data stored in a session variable is destroyed when the session ends (i.e. when the user logs off or closes the browser) but any data stored in a cookie will survive.
This is because cookies are stored on your local machine so the browser can access them each time you log in to a site with out having to prompt for the information again. This makes life easier for your user in most cases but the downside is that cookies can be blocked by some security settings.
A session variable is not stored on your local machine so as soon as your session is ended the variable is destroyed.
I hope this makes sense,
Dr B -
hi. thank u for ur helpOriginally posted by DrBunchmanHi RamyaSrinath,
Basically the difference is that any data stored in a session variable is destroyed when the session ends (i.e. when the user logs off or closes the browser) but any data stored in a cookie will survive.
This is because cookies are stored on your local machine so the browser can access them each time you log in to a site with out having to prompt for the information again. This makes life easier for your user in most cases but the downside is that cookies can be blocked by some security settings.
A session variable is not stored on your local machine so as soon as your session is ended the variable is destroyed.
I hope this makes sense,
Dr BComment
Comment