A cookie is information that a website puts on your hard disk so that it can remember something about you at a later time.
More technically, it provides tracking information for future use, which is stored by the server on the client side of a client/server communication.Typically, a cookie records your preferences when using a particular site.
Using the Web's (HTTP) Hypertext Transfer Protocol, each request for a web page is independent of all other requests.
For this reason, the web page server has no memory of what pages it has sent to a user previously or anything about your previous visits.
A cookie is a mechanism that allows the server to store its own information about a user on the user's own computer.
You can view the cookies that have been stored on your hard disk (although the content stored in each cookie may not make much sense to you). The location of the cookies depends on the browser.
Internet Explorer stores each cookie as a separate file under a Windows subdirectory. Opera stores them in a single cookies.dat file.
1) When a user visits a website, the URL of the website is passed to the web server.
2) When visiting the website, the user performs an activity such as buying a coat.
3) Information about what the user purchased, along with some personal information about the user, is then sent to the web server.
4) The server then passes the cookie to the user's computer.
5) The next time the user visits that web site, a banner ad for coats are displayed. This is one way cookies are used to customize a website based on information provided by the user.