Upload
little-bunny-foo-foo
View
217
Download
0
Embed Size (px)
Citation preview
7/23/2019 Similarities and Differences of Cookies and Session
http://slidepdf.com/reader/full/similarities-and-differences-of-cookies-and-session 1/1
similarities between coookies and session1. both of them are session tracking techniques2. both of them impletment key-value pair3. both uses String as its key4. both of them are containers
differences between cookies and session1. cookie uses string as value while session uses object2. cookie persists on the client while HttpSession is contained on the server3. cookie is prone to privacy vulerability while HttpSession object is not(resides on the server)4. cookie is limited to 20 cookies per site while session exists one per user5. cookies persists a lot longer than session
Three Types of session termination1. instant timeout - using invalidate()2. programmatic session timeout - using setMaxInactiveInterval()3. declarative session timeout - using web.xml