Introducing our solution to the cookie law. Download and use ‘Cookie Consent’

Cookie consent logoIf you’re a web developer in Europe you’ll likely have already heard about the Cookie Law, it’s been causing quite a stir and we’ve already blogged about it here, and we hated it so much that we started a petition against it at nocookielaw.com.

Much has been written about the Cookie Law, and many people have different opinions of how it should be implemented. But one thing that’s clear is that the ICO wants all websites to “obtain consent” before setting any cookies. This means creating some sort of mechanism to allow users to “opt-in” to set cookies on our websites.

Our solution

According to this article, the Cookie Law will cost the UK £10 billion for companies to comply with the law. Seems a bit steep, so we created a solution that we’re encouraging other companies to download and use for free.

Introducing Cookie Consent

We call our solution Cookie Consent, which is a JavaScript plugin you can use by adding just a few lines of code to your site. Users will be shown a message which drops down from the top of the screen asking them if they want to allow cookies.

Screenshot showing cookie consent

Click "see details" to see which types of cookies are used

Here’s some of the other features:

Global settings

Not only can your users click to approve the cookies on your site, they can also set global settings which applies to all websites using our plugin. This means if they consent to all cookies on all websites, they won’t be bothered by a consent message on the next website they visit.

Open source

We liked our plugin so much that we want all websites to use it! We’ve released it under the GNU General Public licence, meaning you can redistribute it and modify it if you want to.

Customisable

We’ve added a lot of ways to customise the Cookie Consent plugin. You can choose for it to popup from the top or the bottom of your website, and you can use your own CSS to completely change how it looks.

Watch quick video tour of Sitebeam

Test your website with

or learn more
  • jakenoble

    Good stuff!

    • silktide

      Thanks Jake! 

  • jakenoble

    Your welcome and hello again.

    I have had this thought for sometime as a solution for “being asked all the time” about cookies. It isn’t something every web user could do, but would be useful for techs like ourselves and our peers.Firstly you would need to find a list of the most popular cookies that are set to allow further cookies. E.g. allow_cookies, accept_cookies, etc.Then create browser plug ins for Chrome, Firefox, etc. The plug in would set all of these cookies (allow_cookies, accept_cookies, etc) to true/on/1 on every page load. So when you hit a site which uses one of these cookies, the plug in has already set the cookie which states “it’s OK to use cookies with me” – cookies get set as normal and your none the wiser? 

    • oliveremberton

      I quite like that idea, although I think the problem with this law is it wouldn’t consider that informed consent (of course, for users it would be fine). It’s the same reason that browser settings aren’t considered sufficient to comply – they don’t explain the purpose of individual cookies. 

      That’s one reason why our solution breaks cookies into three main categories, which we thought is a fair balance of enough information but no so much to be overwhelming for users. 

      Best possible solution is cookies start including an explanation of what they do, and the browser can manage them. But given how rigid the cookie spec is – there’s no obvious extensibility you could add without breaking it – I don’t see that happening soon, if ever.

      We can always hope the law gets ignored of course :)

      • silktide

        Funnily enough, I asked Bruce Lawson from Opera about this yesterday. He said 
        “as far as I know it requires explicit consent by user. So how can browser solve that?”…
        “accept all cookies” doesn’t feel like explicit consent to me

        Our Cookie Consent solution aims to do what you’re talking about, if users accept all cookies on 1 site of type: “Social”, then visit a 2nd site using our plugin, the plugin will know the user consented to all social cookies and not show a message (unless there’s another type of cookie that they haven’t consented to)

        • jakenoble

          Yes, I agree. It’s no good for the law, but potentially useful for users who just get sick of seeing the pop ups.

  • http://www.facebook.com/people/Craig-Burr/100003290517790 Craig Burr

     Awesome and will definitly use it though I am waiting for the “day” to come before I implement it. I think it sucks that this law is even beingthought about let alone implemented.

    • silktide

      Have you signed our petition against the law? We want as many signatures as possible http://nocookielaw.com

      • http://www.facebook.com/people/Craig-Burr/100003290517790 Craig Burr

         Signed and shared. Not sure what sort of impact we can have but hopefully we can make them stand up and at least think it through a little more.

  • http://www.PrideParkJobs.co.uk/ Pride Park Jobs

    Can’t believe this information abouT the cookies. Well, I can but you know what I mean… Thank you for this. I will have to do some reading and check on our own sites!

  • Alex P

    Hi I’m just wondering whether my site is okay or breaking the EU rules. I set up my website and the google analytics 2 years ago when I still in Singapore. Starting 2 months ago I move to Germany for the next 4 months. So I set up my site back then when I was in Singapore and now I move to Germany and still control it. Is it also breaking the EU rules? If yes then I need to use this script in my site. thanks! :)

    • silktide

      Hi, the law applies to any website with an audience/customers in the EU, it doesn’t matter where it’s hosted. 

  • Charlotte

    Hi

    I really like this, (especially the ability to remember the settings across websites). However, when I open your site on a mobile phone all I see is a (scary) black screen with just the two buttons. Can you change this with the CSS?

    • silktide

      Hi Charlotte, unfortunately this was the best solution to ensure that users saw the message, other solutions we saw didn’t work so well with mobile and were too easy to ignore which is why the black screen is so prominent. 
      If you host the plugin yourself you’ll be able to add your own styles and colours, and be able to change the text displayed. 

  • http://twitter.com/twistystraws Simon Hollingworth

    Thanks very much for this solution. Am I the only person seeing a difference in display in Internet Explorer ? (version 9). Firefox and Chrome display the dark version as expected, but IE shows a light coloured banner, and mis-aligned buttons with no curved corners…

    • silktide

      IE8 and lower won’t show the rounded corners because it doesn’t support CSS3. We made some fixes specific to older IEs in version 1.0.2, if you update to that version you’ll find it works fine. 

  • http://www.foxxweb.co.uk/ John Clarke

    Great piece of code but if your currently running the lightbox such as scriptaculous.js it clashes and neither pieces of code will execute

    • Nick Kirk

      cookie consent code works fine with Lokesh Dhakar’s Lightbox v2.6

  • Craig

    I suggest there is an error in the CSS, that prevents the cc-notification div displaying a black background on some instances of IE7 and IE8. Line 12 of style.css should read -

    background-color: #000 !important;