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
What is rest api in php?
What is htaccess? Why do we use this and where?
What are the different tables(engine) present in mysql, which one is default?
Can you convert php to html?
What language is similar to php?
What is difference between php and html?
What is difference between include,require,include_once and require_once()?
What is the difference between query and inquiry?
Explain whether it is possible to share a single instance of a memcache between multiple php projects?
Tell me what is the use of explode() function?
List some array functions in php?
What is php session id?
Where is the submitted form data stored?
Can you specify the "new line" character in single-quoted strings?
Do while loops php?