Differentiate cookie and session………[December – 2012, May – 2013]




Cookies
Session
1
Data on Client-side
Data on server-side
2
Limited support for data handling
Unlimited side of data as per as server capability
3
only text
It can store any type of data
4
Age of data is fixed .
Age of data is not fixed .
5
Remains on client machine
Destroy after session timeout or logout
6
All cookie need to travel each time client sends request to server.
Less data traveling over the network
7
Less secure
More secure mechanism to session tracking
8
Cookies may or may not be individual for every client.
Always individual.
9
We can disable cookies.
We can’t disable session.
10
Most browsers support cookies of up to 4096 bytes(4kbytes).
Size not fixed.
11
Most browsers allow only 20 cookies per site; if you try to store more, the oldest cookies are discarded. 
Number of session not fixed.