Skip to content

Cookies

Cookies are small text files that a website stores on a user’s computer or phone. The cookie law is set out in Article 5(3) of the ePrivacy Directive and in national rules: storing or reading cookies requires consent, unless they are strictly necessary for a service the user has asked for. The rule also covers pixels and similar technologies.

Back to Dictionary

Table of Contents

    The cookie rule is part of the ePrivacy rules, which apply alongside the GDPR. Our GDPR compliance guide covers the wider data protection requirements.

    Types of cookies

    • Necessary and non-necessary cookies: A necessary cookie is needed to provide a service the user has explicitly asked for, or only to transmit a communication. Other cookies, for example for marketing, are non-necessary and require consent.
    • First-party and third-party cookies: A first-party cookie is set by the website the user visits. A third-party cookie is set by another party, for example through content embedded on the page.
    • Similar technologies: The rule is technology-neutral. It applies to any storing of information, or access to information already stored, on the user’s device, not only to cookies. The EDPB explains its technical scope in Guidelines 2/2023 (version 2.0, adopted 7 October 2024).

    When do cookies require consent?

    Under Article 5(3) of the ePrivacy Directive, storing information or gaining access to information already stored on a user’s device requires consent, given after clear and comprehensive information. There are two exceptions: technical storage or access for the sole purpose of transmitting a communication, and storage or access that is strictly necessary to provide a service the user has explicitly requested.

    Each member state implements the rule in national law. In Denmark, it is in the Executive Order on cookies (no. 1148 of 9 December 2011): section 3(1) requires consent after comprehensive information, and section 4 contains the exceptions.

    In Planet49 (C-673/17, 1 October 2019), the Court of Justice held that a pre-ticked checkbox is not valid consent to cookies. The information given to the user must also include how long the cookies will be active and whether third parties can access them.

    Cookies and the GDPR

    The cookie rule applies whether or not the information stored or read is personal data (Planet49). Where cookies do involve personal data, the processing that follows also needs a legal basis under the GDPR.

    Legitimate interest cannot replace the consent to the cookie itself. For storing and reading information on the device, Article 5(3) takes precedence over GDPR Article 6: where it requires consent, the controller cannot choose freely among the legal bases in Article 6 (EDPB Opinion 5/2019). Legitimate interest can at most be the legal basis for the processing that follows. The consent itself means the same as in the GDPR (Article 2(f) of the ePrivacy Directive read with GDPR Article 94(2)).

    Where data collected through cookies is used to analyse or predict a person’s interests, for example for targeted marketing, the processing may also be profiling under the GDPR.

    What the organisation documents

    The organisation should be able to show which cookies its website sets and why, and that the consent it relies on was given. In practice, that means an overview of the cookies with their purpose, how long they are active and whether third parties have access, and a record of the consents.

    Cookies in .legal

    The ePrivacy framework in .legal has controls for the cookie rule in Article 5(3), but the cookie banner itself requires a cookie tool, which .legal is not.

    Frequently asked questions about cookies

    Do all cookies require consent?

    No. Under Article 5(3) of the ePrivacy Directive, consent is not required for storage or access whose sole purpose is to transmit a communication, or that is strictly necessary to provide a service the user has explicitly requested. All other cookies require consent after clear and comprehensive information.

    Can you use legitimate interest for cookies?

    No, not for storing or reading the cookie itself. Under Article 5(3) of the ePrivacy Directive, that requires consent unless the cookie is used only to transmit a communication or is strictly necessary for a service the user has explicitly requested. Legitimate interest can at most be the legal basis for the processing of personal data that follows.

    Is a pre-ticked checkbox valid consent to cookies?

    No. In Planet49 (C-673/17), the Court of Justice held that a pre-ticked checkbox is not valid consent to cookies. The information given to the user must also include how long the cookies will be active and whether third parties can access them.

    Does the cookie rule apply when the cookie contains no personal data?

    Yes. Article 5(3) applies to storing and reading information on a user’s device whether or not the information is personal data, as the Court of Justice confirmed in Planet49. If personal data is processed, that processing also needs a legal basis under the GDPR.

    Where do the cookie rules come from?

    The cookie rule is in Article 5(3) of the ePrivacy Directive (2002/58/EC), which got its current wording from Directive 2009/136/EC. Each member state implements it in national law. In Denmark, that is the Executive Order on cookies (no. 1148 of 9 December 2011). The EDPB explains the technical scope of the rule in Guidelines 2/2023.

    Still unsure?

    Ask Johannes directly, he runs most demos personally

    Book him here

    Are you on top of compliance?

    Let us help you navigate the rules. Book a free demo of dotlegal.

    +400 companies use .legal
    Region Sjælland
    Aarhus Universitet
    aj_vaccines_logo
    Realdania
    Right People
    IO Gates
    PLO
    Finans Danmark
    geia-food
    Evida
    Klasselotteriet
    NRGI1
    BLUE WATER SHIPPING
    Karnov
    Ingvard Christensen
    VP Securities
    AH Industries
    Lægeforeningen
    InMobile
    AK Nygart
    DEIF
    DMJX
    Axel logo
    qUINT Logo
    KAUFMANN (1)
    SMILfonden-logo
    kurhotel_skodsborg
    nemlig.com
    Molecule Consultancy
    Novicell