A cookie is defined by the HTTP communication protocol as a string of information sent by an HTTP server to an HTTP client, which the latter returns each time the same HTTP server is queried under certain conditions.
The cookie is the equivalent of a small text file stored on the user’s terminal.
It is sent as an HTTP header by the web server to the web browser, which returns it unchanged each time it accesses the server.
A cookie can be used for authentication, session (status maintenance), and to store specific information about the user, such as site preferences or the contents of an electronic shopping cart.
Because they are generally stored as simple text files, cookies are not executable. They are not spyware or viruses.
Most recent browsers allow users to decide whether to accept or reject cookies. Users can also choose how long cookies are stored. However, the complete rejection of cookies makes some sites unusable. For example, shopping carts from stores or sites that require a connection to a customer area for example. Source: www.wikipedia.org .