Monday, October 20

What is Cookie? What is Session?

Arun Karthik Thanks

Cookie:
Cookie is a text file which is created by the website which you visit.It will store the user's information along with the user ID. There are two types of cookie

1) Session Cookie
2) Persistent Coookie

Session Cookie : 

This cookie exits until you close a session , this will not save any information (meaning in text file in your hard disk).
Persistent cookie :

This type of cookie saves a text file in your disk. The information saved in the text entirely depends on the site which you visit.

Sample cookie Info :
User ID xxxxxx site name.

Session :

Session basically keeps track of the things which you traverse in a site. When you access a site (example : www.facebook.com) , a seesion will be created along with a unique ID which is called as session ID or JsessionID. This session ID will be provided by the JVM (Meaning the server where you host the application).

Note : Mostly websites uses cookie , so you have to enable cookie in your browser to access most of the website's

No comments:

Post a Comment