EU Cookie Law: 4 jQuery Plugins To Not Break It

Many of us probably heard the EU Cookie Law already and thinking about "what to do" and many others should be saying: "cookie what?".

What is it?

It is a European Union e-Privacy Directive that will become active on 26th May 2012 and "requires website owners to take the permission of the user before placing anything (cookies, HTML5 local storage..) to their computer for tracking them (cookies exist in analytics apps, many sign-up/login pages, widgets, etc.).

Which websites need to take action?

It binds any EU-located individual and organization's website, no matter where the website is hosted at. Some EU countries are already applying it and UK will begin to enforce it by 26th May 2012 (also, websites breaking the law can be fined up to £500,000).

jQuery Plugins For EU Cookie Law

In order to make our websites compatible with the EU Cookie Law easily and quickly, here are 2 handy jQuery plugins that will help managing cookies + asking user's permissions for storing them:



This is a beautiful plugin that handles many scenarios you may need to obey the EU Cookie Law.

It allows you to hide any given parts of a website (the parts which generates cookies), and display sensitive modal boxes to users with asking for permission to use cookies.

Also, the plugin can show a "reset button" that can delete all the cookies for that website.



The plugin works by simply inserting a function to the web pages and prompts the user to accept "cookie usage" for the site.

Cookie creating scripts should be inserted into that function and they'll be executed automatically if the user accepts it.



The plugin displays a notification to visitors asking "if they let cookies by this site to be enabled".

Depending on the status (the first time user visits the page, cookies are rejected or accepted), the notification bar changes colors.



CookieGuard is a little more complicated yet feature-rich solution that allows defining cookies one-by-one and defining if they are "essential" or not.

Once it notifies the users about the cookies, they can select which ones to be activated or choose to enable all "essential" ones but not the others.

Learn More About The EU Cookie Law


What do you think about it?

What are your thoughts about this law?

Do you think it is applicable?

Does it fit the nature of internet?

Please feel free to share your thoughts in the comments.

  1. Reply Adam Wood May 15, 2012 at 2:31 AM

    I think this is the most stupid of many stupid laws to come out of Brussels and it will be interesting to see how many sites bother to implement something.

    However Cookiecuttr is a very nice implementation and will be making it’s appearance across my sites soon (well by the deadline I suppose!). I will be checking out cPrompt too!

  2. Reply Mark Thomson May 15, 2012 at 2:59 AM

    This is going to be one of those wonderful pains in the backside!

    For the simple reason that a visitor to the major it of sites will see a modal box or a drop down and think that there’s a virus or they have broken something.

    It’s a great example of something being mandated by people who have no idea about it.

  3. Reply Matt May 15, 2012 at 8:34 AM

    I’m not going to hurry to add a warning
    The EU can leave me alone

  4. Reply Denny May 15, 2012 at 10:45 AM

    Hopefully Greece, Spain, Portugal, Ireland and Italy will soon bring down the entire European experiment and we can ignore all the crap coming out of the overpaid pen pushers in Brussels. They’ve made their beds, pretty soon they’ll be laying in them. If they can still afford a bed, that is.

    Arrivederci, Eurocrats.

  5. Reply Rm May 15, 2012 at 10:57 AM


    Cookies arent exactly a privacy concern.. A law put in place by people who dont understand the internet.

  6. Reply A Spanish was here May 17, 2012 at 10:25 AM

    I also think this is another stupidity of some stupids with too much spare time to give birth stupid ideas like this one.

    PS: As a Spanish citizen, I hope Denny gets wrong… also it’s true that since we entered “the euro”, we get more poor every year. Salaries are like in Portugal and commodity prices are like in Germany or Sweden…

  7. Reply Andrew May 17, 2012 at 4:08 PM

    The people who made this law, have no idea what they are talking about, I bet it will be repealed or we will find a more effective way around it with databases pretty fast.

  8. Reply Jon July 16, 2012 at 8:42 AM

    A pointless law – those who know about computers don’t care about cookies as they’re not a problem. Those who don’t know about computers will end up panicking when asked about them and unable to use certain websites.

  9. Reply Cookie Pusher November 22, 2012 at 4:17 AM

    I’m glad other people feel the same way. I’ve been slowly getting pissed off at sites that display these massive boxes that I just want to ignore.

    The biggest joke here is “individuals”… !

  10. Reply Ian Smith December 7, 2012 at 1:22 PM

    But, 5 months on and it is still with us.
    Anyone found an easy implementation for ordinary html sites? There are some great simple solutions for WordPress, but not found yet for Dream-weaver-generated sites.

  11. Reply Geoff January 7, 2013 at 11:54 AM

    So we in the EC have to go to the trouble of fitting in with this law to justify the existence of overpaid Eurocrats. Meanwhile the rest of the world stares on in amazement. What a crazy law!

Leave a reply