Quantcast
Channel: Are session and cookies the same thing? - Stack Overflow
Viewing all articles
Browse latest Browse all 10

Answer by Ravi shankar for Are session and cookies the same thing?

$
0
0

As for may knowledge:

If you set the variable to "cookies", then your users will not have to log in each time they enter your community.

The cookie will stay in place within the user’s browser until it is deleted by the user.

But Sessions are popularly used, as the there is a chance of your cookies getting blocked if the user browser security setting is set high.

If you set the variable to "sessions", then user activity will be tracked using browser sessions, and your users will have to log in each time they re-open their browser. Additionally, if you are using the "sessions" variable, you need to secure the "sessions" directory, either by placing it above the web root or by requesting that your web host make it a non-browsable directory.

The Key difference would be cookies are stored in your hard disk whereas a session aren't stored in your hard disk. Sessions are basically like tokens, which are generated at authentication. A session is available as long as the browser is opened.

hope following links will further clarifying your doubts

http://wiki.answers.com/Q/What_is_the_difference_between_session_and_cookieshttp://www.allinterview.com/showanswers/74177.html


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>