What is the different between cookies and session in php?
Answer Posted / jeet
1. Session Stored data at server and session_id (PHPSESSID)
at client side(browser). Cookies stored data at client
side(browser) and each time the same computer requests a
page, it will send the cookie too.
2. Sessions are more secured than cookies as data stored at
server side.
3. Sessions can not be blocked by user from browser while
cookies can be.
4. For login Sessions fail as data is served by multiple
servers ( absence of load balancing ) while cookies do not
as stored at cliet.
5. Sessions amount of data to be stored is NOT LIMITED.
Cookies amount of data to be stored is LIMITED.
6. Sessions can store OBJECTS. Cookies can only store STRINGS.
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
How cookies are trported from browsers to servers?
What is singleton class in php?
What is helper function?
What is polymorphism in php?
What will the ?getdate() function returns in PHP?
Explain the importance of the function htmlentities.
What is the use of pear in php?
How do you connet mysql database with php?
Which variable declarations within a class is invalid in php?
What is the use of explode() function?
Can we use get instead of post?
Which PHP function would you use to send an email?
Does php require a web server?
Explain the three different kinds of Arrays?
What is repository in php?