Cookies are innocuous text files stored on the user’s computer, accessed via the browser, and referenced by a unique identifier provided by a web site. Over and above the unique identifier the cookie can contain any information that the user has entered in their interaction with the site.
Assuming that the user’s browser is set to accept cookies, on the user’s first visit to the e-commerce site, the user’s machine, via the browser, is checked for a previously existing cookie and if there is a match then the site can read the contents of the cookie. If not, a cookie is created that will contain the information required.
On subsequent visits, and assuming that the user is on the same browser and has not cleared the cookie, it is then possible to read the contents of the cookie and obtain the user’s purchase history via the content or the cookie or, more likely, by allowing the user to automatically access the web site’s central database, which would contain the purchase history.