Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It seems the EU cookie law is far more unwieldy than it seemed at first glance :\</p> <p>There does not seem to be a way to block the cookies set by Google's +1 button. The <em>user</em> might block third-party cookies in their preferences, but <em>you</em> as a site developer cannot indicate that <em>your specific site</em> disallows cookies from third parties, and the actual cookies are set on a different domain, so your Javascript cannot interfere with that either.</p> <p>The directive allows you to keep <em>essential</em> cookies, so you <em>can</em> store a cookie for the purpose of recording the visitor's acceptance or rejection of cookies. You could ask for permission <em>once</em> if that cookie is not set. You should proceed with initializing the +1 buttons <em>only</em> when the visitor gives you permission to track third-party cookies <em>or</em> you already have their permission recorded in the cookie; otherwise you should skip the +1 button initialization code.</p> <p>Rough incomplete example (actual cookie manipulation left out):</p> <pre><code>(function() { var allowed = getCookie('allowCookies'); if (allowed === undefined) { allowed = confirm('Allow cookies?'); setCookie('allowCookies', allowed? 1: 0); } if (allowed) { // initialize +1 buttons: var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); // initialize any other third-party tools that might set cookies ... } })(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload