Get Answers to all your Questions

header-bg qa

What is difference between cookies and session?

Answers (1)

best_answer

Cookies are small file (Max 4 KB) on the client-side which is stored by the webserver. It is not dependent on the session and it expires depending on the lifetime you set for it. 

Sessions are stored on the server and it a global variable. It is dependent on the cookies and it ends when the user closes its browser.

Posted by

Deependra Verma

View full answer