If you're not signed in to a website and you add items to your shopping cart, you can clear your browser's cookies to empty your shopping cart. However, if you have an account and you're signed in to a merchant's website, you probably need to delete each item individually or select a button the merchant provides that enables you to empty your cart.
When you visit a merchant's website to shop online and you don't have an account with the merchant or you haven't signed in to your account, you are an anonymous shopper. When you add items to your cart, the status of your shopping cart is stored on your computer using cookies, which are small text files your browser saves on your hard drive. Every browser has a function that enables you to erase cookies selectively, erase all cookies saved since a certain time, or delete all cookies entirely. Since the information about what's in your shopping cart is stored in cookies, when you erase the cookies, you empty your shopping cart.
If you're signed in to your account on a merchant's site, however, most shopping cart software saves the information about what's in your cart on the merchant's server, not on your computer. This prevents you from inadvertently erasing the contents. To clear your cart when you're signed in, you must use the merchant's shopping cart functionality to delete each item from your cart or locate a button that enables you to clear the entire contents of the cart.