We are legally obliged in a few months to obtain consent from users to allow us to store any cookies on the users PC.

My query is, what would be the most effective way of storing this consent to ensure that users don't get repeat requests to give consent in the future, obviously for authenticated users I can store this against their profile. But what about for non-authenticated users.

My initial thought, ironically, was to store given consent in a cookie..?

1 Answer 1


You could do it by IP, however I think your cookie solution to the cookie-consent is in concurrence. :)

But seriously though, a consent cookie seems like the best solution. Give a little popup-window, and if they click 'Consent', then store the cookie. Check for that upon visiting any page.

  • 2
    And if they say no, they don't want cookies? Do you store that fact in a cookie? Commented Feb 10, 2011 at 13:38
  • 2
    What about if they say "No" then say, "can we store this setting in a cookie? Yes / No (if you say No, we will have to ask you each time you visit the site)" Commented Feb 11, 2011 at 23:33
  • 2
    I'd happily give +1 for the cookie option, but I can't give +1 for the IP option - as @Mark points out, consumer ISP will reuse IP's for different connections, so if I refuse, but my neighbour accepts, and later our IPs switch and you start storing cookies I'd not be happy. Equally, companies often have multiple users behind a single firewall all sharing an external IP address. This needs to be a per-user setting - at the machine level... Commented Apr 3, 2012 at 14:20
  • 1
    @Micky's solution seems to be the most practical, even if it is less intuitive. But then again, this whole situation begs for awkwardly made solutions in the interest of protecting those without the intelligence to protect themselves. Commented Apr 4, 2012 at 4:44
  • 1
    @Christopher a cookie to store cookie consent should only be kept locally (if "no" is pressed the cookie data is never send to the server). This means it's both a required functional cookie, as well as not using any privacy data.
    – paul23
    Commented Jan 14, 2020 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.