Jeanco
03-08-2006, 11:57 PM
Hello,
I'm developing a site that will have users login and will also include a simple shopping cart. I'm wondering if its better to use cookies, sessions, or a combination of both to keep track of users logged in and anyone (including non-logged in user's) shopping cart contents.
My inital thinking is that sessions would be easier to manage, but that cookies would allow me to keep track of shopping cart contents if they leave the site and come back... and would also allow me to give users the option of staying logged in for the next time they visit the site. However, I know not everyone has cookies enabled (although granted, most people do - especially those that shop online). Anyway, I'm looking for a little guidance before I go one way or the other.
A brief explanation or link pointing me in the right direction would also be appreciated ;)
Thanks in advance.
I'm developing a site that will have users login and will also include a simple shopping cart. I'm wondering if its better to use cookies, sessions, or a combination of both to keep track of users logged in and anyone (including non-logged in user's) shopping cart contents.
My inital thinking is that sessions would be easier to manage, but that cookies would allow me to keep track of shopping cart contents if they leave the site and come back... and would also allow me to give users the option of staying logged in for the next time they visit the site. However, I know not everyone has cookies enabled (although granted, most people do - especially those that shop online). Anyway, I'm looking for a little guidance before I go one way or the other.
A brief explanation or link pointing me in the right direction would also be appreciated ;)
Thanks in advance.
