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

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

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:
Ripley: VI - Some Heavy Instrument
Frieren: Beyond Journey's End: Well-Laid Plans
Oil edges higher as U.S. weighs added sanctions on Iran oil exports after attack on Israel
TGI Fridays to go public through merger with its U.K. franchisee
How to manage your money in your 40s, according to CFPs: As your investments grow, 'mistakes can get bigger' too
Any problem with being a "no show" on a connecting flight?
Requesting RV Rental Recommendations in Reno
Pullback is just a 'healthy consolidation,' use it to buy AI plays, says BlackRock's Kate Moore
Sen. Tom Cotton encourages drivers to drag Gaza cease-fire protestors from blocked roads
IMF upgrades global growth forecast as economy proves 'surprisingly resilient' despite downside risks