Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is storing a session id in a cookie a better practice than a get var?

The title pretty much says it all. A cookie seems to have a few advantages to me; however, I'll wait to see what others say.

Also - assuming a cookie is better, what can be done to make passing the session by GET variable better?

Specifically I'm thinking about PHP; however, this should apply generally.

like image 999
Tim Lytle Avatar asked Dec 29 '22 05:12

Tim Lytle


1 Answers

Storing it in a cookie as opposed to in a GET var has at least one advantage, in that the session ID'd URL will never be bookmarked by any user.

like image 112
karim79 Avatar answered Jan 13 '23 18:01

karim79