An improved method for purging abandoned shopping carts from an electronic commerce
web server. Periodically, the number of shopping carts that belong to guest shoppers
is determined and compared with a threshold. When the number shopping carts that
belong to guest shoppers exceeds the threshold, a guest shopper garbage collection
routine applies to the shopping carts that belong to guest shoppers, and an established
shopper garbage collection routine applies to carts that belong to established
shoppers. In one embodiment of the invention, the guest shopper garbage collection
routine purges shopping carts that have been inactive for a first period of time,
whereas the established shopper garbage collection routine purges shopping carts
that have been inactive for a second period of time that is longer than the first.