COOKIES VS SESSIONS


Some of my friends asked me to write on some basic differences between a Session and a cookie.
Both are little bit confusing, but easy to understand.
So, here they are



COOKIES SESSIONS
1. Cookies are small text files which are stored on our computer by web browsers1. Session are 32 bit variables which hold information about one user available to all pages of one application
2. Cookies can store string data type2. Sessions can store any data type
3. Cookies are stored at the client side3. Sessions are stored at the server side
4. Cookies are not secured, as they are stored in text-format4. Sessions are secured, as they are stored in binary format
5. Cookies can be disabled5. Sessions cannot be disabled
6. Cookies give no burden to server6. Sessions give burden to server, as servers need to handle them
7. Cookies are persistent and non-persistent7. Sessions are non-persistent, as its lifetime can be set manually.

















0 comments:

Post a Comment