A cookie is a small text-based data file that a web server may ask to save in the site visitor’s computer. By generally sending the cookies back with each request to the site in question, it is possible for the server to keep track of the visitor’s preferences or identity (to the extent that it is known).

The cookies can contain information in plain text (for example, preferences: language = sv), but often the contents of the cookies are encrypted, so the user can not know what information it contains. Often, the cookie contains only one key to a database mail on the server, the user has no control over how much information is stored about him or her.

In the cookies, a time after which the cookies are no longer used can be stated. This will save the cookies (depending on the browser settings) on the computer’s hard drive, to be returned later. Otherwise, cookies are stored only in the primary memory of the computer and are valid until the browser is turned off. The latter types of cookies are often called session cookies because they are used for a single session, not to store information about a customer between the sessions.

On July 25, 2003, the new Electronic Communications Act came into force, meaning that anyone visiting a website should be informed about the use of cookies and given the opportunity to refuse such use.