Difference between session and cookie

Forums .NETDifference between session and cookie
Staff asked 7 months ago

Answers (1)

Add Answer
monika gabani Marked As Accepted
Staff answered 7 months ago
Session Cookie
Sessions are server-side files that contain user data. Cookies are client-side files on a local computer that hold user information.
When the user quits the browser or logs out of the programmed, the session is over. Cookies end on the lifetime set by the user.
To begin the session, we must use the session start() method. Because cookies are kept on the local computer, we don’t need to run a function to start them.
It can hold an indefinite quantity of data. It can only store a certain amount of info.
We can keep as much data as we like within a session, however there is a maximum memory restriction of 128 MB that a script may consume at one time. The browser’s cookies have a maximum capacity of 4 KB.

Subscribe

Select Categories