What are website cookies?

Cookies are text files that a website sends to a user’s browser, with data about their profile and browsing behavior on pages. The purpose of cookies is to remember the visit information to facilitate the next access and improve your navigation on the website.

Lou Montulli was the professional responsible for creating cookie technology in 1994, when he worked at Netscape, the company that built one of the first widely used browsers. At that time, the team used the term “magic cookie”, which refers to fortune cookies — that is, cookies with an embedded message, such as internet cookies.

His intention was to solve the web’s memory problem, as websites treated all users, even repeat visitors, as mere strangers.

What are browser cookies for?

In general, cookies serve to improve your web browsing experience. But they can do this in different ways. Below you will see the main uses of cookies on the internet:

Register user information and preferences on the website

Cookies can record user information, such as data filled in forms, access passwords or products left in the shopping cart, which facilitate their access on a next visit.

In addition, they may also store user preferences, such as choosing a particular language, accessibility settings or consent to the collection of cookies.

In these cases, they are called functionality cookies, as they allow the use of features essential to the website experience.

Increase website security

Cookies are also used to offer security to the user’s navigation, as he interacts with the site and fills in sensitive information in forms.

Security cookies ensure user authentication and prevent spam, fraud and attacks. They are able to recognize when requests made during navigation are really from that person, and not from malicious users.

Analyze the profile of website visitors

Cookies also serve to understand how users interact with pages and websites, as well as their main profile characteristics. You can know, for example, the location of visitors, the device they use, the main pages accessed, the origins of visits and their expenses in an e-commerce.

With this information, you can get to know your audience better, adjust content to their interests and better plan marketing strategies.

One of the most used analysis cookies is “_ga”, from Google Analytics, which collects information from visitors to a website, without identifying them individually, and offers statistical reports on their use.

How do cookies work?

Internet cookies are sent by the website’s server to the user’s browser, containing data about their interactions with the pages. They are identified with a unique code, which associates that data with the user.

When he returns to visit the same site, it is the browser’s turn to send the cookies back to the site’s server. In this way, the site can use and display that stored information, without the user having to enter data again.

The command for this to happen must be present in the header of the website’s code, with attributes that bring instructions to the browser, such as the domain of the website to which it refers and the expiration date of the cookie.

Depending on the type of cookie, they can be stored only while the user browses the website (session cookies) or remain recorded even after closing the window (persistent cookies). In the latter case, cookies are stored until their expiration date or until the user clears their data in the browser.

Users have control over which cookies may be stored about their activities. Most browsers offer control options, in addition to allowing you to clear all saved cookies whenever you want.

If you use Google Chrome, for example, just access the address “chrome://settings/cookies” in the browser bar. There you can choose to:

  • Show all cookies;
    Block third-party cookies in anonymous browsing;
  • Block third-party cookies;
  • Block all cookies (not recommended).

In addition, you can set specific websites that can always use cookies, that must have their cookies cleared when the window is closed, or that can never use cookies.