Answered: Why do we store a random bigint for cookie id instead the sessionid?

Post date: 2022-05-27 15:08:23
Views: 9

I'd say in all cases they should be interchangeable. In a really weird case in which a user migrates to a different server, session IDs will differ, but cookie IDs won't.

Aside from that, cookie IDs are generated by Q2A and they take 8 bytes (a MySQL big integer). However, PHP session IDs are more unpredictable, server-dependent and most likely would take more space.

For example, 5sd9ev06f3d2j35vgu1i5bri0i is a possible session ID. Those are 26 characters. Storing that would take 26 bytes, which will make searches less efficient.

Please click Here to read the full story.
Other Top and Latest Questions:
Where should I buy ebooks for my Kindle?
Finding a receipt for an Amazon Marketplace order?
Experience with medications for night incontinence?
Root Beer Brewing
What is the incentive structure for the henchmen of Bond villains?
Housemate romance coming to an end. How do I move on?
My Back Itches - but I live alone.
Iron Chef: Quest for an Iron Legend: Battle Street Food: Mason Hereford vs Curtis Stone
Podcast: The Besties: Kicking it Super Hard with Mario Strikers: Battle League
Movie: The Ghost Writer