[thelist] shopping cart design (database or cookie?)

Mike Migurski mike-evolt at teczno.com
Thu Jul 10 19:12:08 CDT 2003


>I'm trying to decide whether or not I should use a database to store the
>contents of a customers shopping cart or a cookie.

Don't use cookies - they are volatile, easy to mess with, easy to lose,
and easy to snoop on. They are limited in size (4k), and their entire
contents ride along on every http request, including images and
stylesheets.

The price-change problem you mention is a non-issue - if the price of an
item is 6 bucks, then it's 6 bucks. Why would the customer have the right
to set a price by adding something to his cart before a price-hike, and
why would an admin care that the customers will be surprised by price
changes? A more effective answer to this is to not change the price too
often, and have some notice to the effect that 'prices are subject to
change.' If a price goes down, the customer will be even more peeved that
they are paying more. :)

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html



More information about the thelist mailing list