adspace
What are the differences between session and cookie?
Answer Posted / Laeek Ahmad
PHP Sessions and Cookies are both used for storing data temporarily, but they have some key differences:
1. Storage: Sessions are stored on the server, while cookies are stored on the client's browser.
2. Data Lifetime: Sessions typically last until the user logs out or the browser is closed, while cookies can persist for a longer duration depending on their settings.
3. Security: Sessions are more secure because data isn't sent to the client, whereas cookie data is sent with each request.
4. Session ID: Each session is identified by a unique session ID, which is stored in a cookie or URL parameter, while cookies can be used to store arbitrary data.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Tell me what kind of things have you done on the social side?
How to calculate the difference between two dates using php?
Write a program using while loop?
sort term descripttion form, report and uery
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer
What is the current stable version of php?
What is trait in php?
What does $_files means?
What is the difference between htmlentities() and htmlspecialchars()?
How to create a web form?
Name and explain five of the PHP error constants?
What is the current stable version of php? What advance thing in php7?
How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain
Which variable declarations within a class is invalid in php?
What is difference between static and final in php?