By Maxime
Reading time :  minutes

Definition of cookies

A cookie is a tiny text file placed in the user's browser by the website they are visiting. This data, which is often discrete, serves as a temporary memory, storing elements such as our preferences or browsing history. When we return to a website, these cookies are sent back to the site's server, enabling it to identify and remember us.

Their purpose is simple: to facilitate and enhance our online experience. Imagine, for example, choosing a language on a website and never having to select it again on subsequent visits... That's what cookies do.

However, like any technology, they must be used wisely. Poorly managed, cookies can raise privacy concerns. It is therefore essential to have a clear understanding of them. In this article, we will demystify these little digital assistants and discuss their importance, particularly for sites developed with Drupal.

The different types of cookies

When we talk about cookies, it's important to understand that there isn't just one type. Just as there are different sorts of biscuit, there are also different types of cookie on the Internet, each with a specific role to play. Let's take a look at these varieties together.


Session cookies and persistent cookies

Session cookies: Think of these cookies as post-it notes. They are created when you visit a website and are deleted as soon as you close your browser. They are useful, for example, for keeping items in your shopping basket while you continue browsing.

Persistent cookies: Unlike session cookies, these remain in your browser even after you close it, for a set period of time or until you delete them. They can remember your preferences for a future visit, such as your choice of language when visiting a site.

First-Party Cookies and Third-Party cookies

First-party cookies: These cookies are like homemade biscuits. They are created by the website you are visiting and are generally used to remember preferences specific to that particular site. They only exchange information between the website and its visitor.

Third-party cookies: These are a bit like the biscuits a friend brings you at a dinner party. They come from other websites (other than the one you are currently visiting) and are often used to track your browsing on different sites, generally for advertising or analysis purposes (such as remarketing).

You should also be aware that there are Zero-Party Cookies, which collect data shared by the visitor on a voluntary basis (such as a quiz) and Second-Party Cookies, which refer to information collected about the behaviour and interests of a visitor to a site.

Secured and non-secured cookies

Secured cookies: These cookies are like letters in a sealed envelope. They are only transmitted via secure connections (such as HTTPS) and are often used on sites where security is crucial, such as online banks.

Non-secured cookies: These are cookies that can be transmitted even if the connection is not secure. It's a bit like sending a postcard: the information is visible to anyone who knows where to look.

Cookies and Drupal

Drupal is used by thousands of websites to publish content, manage users and offer personalised web experiences. Did you know that the CMS is now in version 10? If not, feel free to read this article ;)

But how does Drupal remember who you are, your preferences or even where you left off on your last visit? You already know the answer: cookies.

The role of Drupal cookies

  • Session management : When you connect to a Drupal website, a session cookie is created. This cookie enables the site to identify you on each new page you visit, so that you do not have to log in again each time. Once you log out or close your browser, this cookie is deleted.
  • User settings: If you change certain preferences on a Drupal site, such as the language of the site or the theme, e.g. dark mode if available, a cookie may be used to remember these choices. On your next visit, the site will remember your preferences and apply them automatically.
  • Tracking and analytics: Although it depends on how the site is setup, some Drupal sites use cookies to track how visitors interact with it. This data can then be used to improve the user experience or to understand which content is the most popular, for example.

Cookies specific to Drupal

Drupal, as a strong CMS platform, uses a number of unique cookies to ensure an optimal user experience. One of the most common examples is the "Drupal.visitor" cookie. This cookie is often used to store a visitor's individual preferences, such as language or other display settings. Such cookies are essential to ensure that visitors' preferences are respected when they return to the website, providing a consistent and personalised experience.

Other cookies may be added depending on the specific modules or features activated on the Drupal site. These cookies vary according to the needs of the site and the administrator's configuration choices.

In conclusion, cookies are essential for Drupal to work properly, as they are for many other online applications. They enable a smooth and personalised user experience. However, as always with cookies, it is crucial to manage them correctly, respecting the privacy and preferences of visitors.

Heading for a cookieless world?

The privacy of individuals is a growing concern worldwide, and third-party cookies are particularly in the spotlight of the authorities. Indeed, the tracking of online behaviour without the user's knowledge or consent has become a highly sensitive issue and is raising concerns about privacy.

A growing number of browsers have begun to ban the use of third-party cookies. Google Chrome, for its part, has already twice postponed the date on which cookies will be removed. The latest information indicates that third-party cookies will be phased out by the end of 2024.

When third-party cookies are banned, marketing professionals will find it harder to track the efficiency of their campaigns because the data collected will be less accurate. In addition, marketers are already experiencing difficulties since the adoption of the GDPR in 2018, due to the requirement to set up consent banners, which skew tracking results and interfere with the user experience.

Conclusion : browse with knowledge and confidence

At the end of our journey, we discovered that cookies, although small in size, are crucial in creating a personalised and engaging web experience. From preserving our personal preferences to facilitating our online sessions, these unsuspected bits of code work behind the scenes to make our web browsing more intuitive and less laborious.

Through Drupal, we have seen how a powerful platform uses these tools not only to improve the user experience but also to provide site administrators with the data they need to better understand and serve their audience. Drupal-specific cookies, such as Drupal.visitor, show how a CMS can both respect user choice and maintain a consistent and secure experience.

It is essential, however, to stay vigilant. In a digital world where privacy is becoming increasingly valuable, managing and understanding cookies is not just a matter of convenience, but also of security and trust. By informing ourselves and paying attention to the cookie policies of the sites we visit, we can surf the web not only with more satisfaction, but also with the peace of mind of knowing that our privacy is being respected.

Whether we are users, developers or site administrators, we share responsibility for ensuring that cookies enhance the web experience without compromising our personal values and rights. With the knowledge we now have, we can move forward into the digital landscape with confidence, assured that we have the tools and understanding to make smart choices online. Although we don't yet know what cookies are going to be eaten for in the near future.
 

Want to discuss about cookies on your website?

Contact Us