The small note that connects separate requests
A browser and a website communicate through a series of separate requests: one to load a product page, another to open the cart, and others to load each new page. The web’s basic request system does not automatically carry the site’s memory from one request to the next. A cookie gives the browser a small piece of information to send back on later visits to that site.
How a cart stays assembled
Often, the cookie contains a session identifier—a short value that points to a record the website keeps on its own servers. When you add an item, the site updates that record. As the browser requests another page, it sends the identifier, letting the site retrieve the same cart rather than start over. Some sites may store cart details differently, but the purpose is the same: connect one page request to the next.
This arrangement also means the cookie usually does not need to hold a full product list. It can act more like a claim ticket: the browser carries the ticket, and the site uses it to find the saved information.
Why the cookie has limits
Cookies are tied to rules such as which site may receive them and when the browser sends them. They are not a universal memory shared by every website, and clearing them can remove the link to a saved session. Depending on the site, the cart may then disappear—or the site may recover it through an account or other stored information.
That tiny exchange is what lets a shopping cart feel continuous even though, technically, the browser keeps asking the website for each page anew.






