Shopping Cart: use cookies or database?
-
Hi, in my website logs, I see that a lot of people are going to my online store and don't seem to have cookies enabled. So I was wondering if it was better to use a database to keep track of a shopping cart or most websites rely on cookies? What's the standard? Cookies or database? Thanks!
-
Hi, in my website logs, I see that a lot of people are going to my online store and don't seem to have cookies enabled. So I was wondering if it was better to use a database to keep track of a shopping cart or most websites rely on cookies? What's the standard? Cookies or database? Thanks!
I dn't know what others do, but I'd go for Database (probably because I detest cookies (accept if you can eat them :-D)), if you do use cookies you should check if the user accepts them... good luck. "If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
-
Hi, in my website logs, I see that a lot of people are going to my online store and don't seem to have cookies enabled. So I was wondering if it was better to use a database to keep track of a shopping cart or most websites rely on cookies? What's the standard? Cookies or database? Thanks!
You only really want to store an ID in a cookie, not the whole basket and other details. Cookies are fickle too, users can clear them, they can expire, they only hold so much data etc. etc. regards, Paul Watson South Africa The Code Project
-
You only really want to store an ID in a cookie, not the whole basket and other details. Cookies are fickle too, users can clear them, they can expire, they only hold so much data etc. etc. regards, Paul Watson South Africa The Code Project
-
Hi, in my website logs, I see that a lot of people are going to my online store and don't seem to have cookies enabled. So I was wondering if it was better to use a database to keep track of a shopping cart or most websites rely on cookies? What's the standard? Cookies or database? Thanks!
if the overhead of running your shopping cart through the database server is too high, and you don't mind expiring variables the in-process session state server works really well for this. Just add your basket class as a session variable.
'Cause I'm living on things that excite me, be it pastries or lobsters or love...
I'm just trying to get by, being quiet and shy, in a world full of push and shove... Jimmy Buffett - The Wino and I know