What do you prefere to use SESSION or COOCKIE | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What do you prefere to use SESSION or COOCKIE

12th Aug 2017, 8:46 AM
Derar Sattouf
Derar Sattouf - avatar
2 Answers
+ 10
You should use both. Cookies are client side and Session is server side. If a piece of data is static or not likely to change across users, store it in a cookie. If the data is specific to a user, store it in the session. HOWEVER. maybe you want the end user to stay logged in when they next open their browser. Then you should use a cookie
12th Aug 2017, 10:42 PM
Aidan Haddon-Wright
Aidan Haddon-Wright - avatar
0
good answer
13th Aug 2017, 8:28 AM
Derar Sattouf
Derar Sattouf - avatar