gbowne1 / spmssite

The code for my old business website.
GNU General Public License v3.0
8 stars 31 forks source link

comply witih cookie law #46

Closed gbowne1 closed 1 year ago

gbowne1 commented 2 years ago

Prerequisites

Current Behavior

Currently no method for complying with the current cookie laws.

Expected Behavior

I would prefer using a CDN for this at least for now.

Several come to mind though..

https://cdnjs.com/libraries/jquery-cookie https://www.jsdelivr.com/package/npm/js-cookie https://cdnjs.com/libraries/js-cookie

there is another from cookielaw.org too. https://cdn.cookielaw.org/scripttemplates/ but there isn't much documentation on how to use it I have found just yet.

Leave a modal or a banner with accept cookie with buttons etc.. and not make it intrusive but easy to find.

Steps to Reproduce

Try it :)

gbowne1 commented 2 years ago

I might suggest adding:

<div id="cookieConsent">
    <div id="closeCookieConsent">x</div>
    This website is using cookies.
    <a href="#" target="_blank">More info</a>.
    <a class="cookieConsentOK"></a>
  </div>
$(document).ready(function(){   
    setTimeout(function () {
        $("#cookieConsent").fadeIn(200);
     }, 4000);
    $("#closeCookieConsent, .cookieConsentOK").click(function() {
        $("#cookieConsent").fadeOut(200);
    }); 
}); 

And adding the tags:

<script src="cookieConsent.js"></script>

gbowne1 commented 2 years ago

I would also suggest the text,

"This site is using cookies..." in a small closeable stripe just above or at the bottom of the footer with a accept and or close/cancel button.

gbowne1 commented 1 year ago

Recent merge fixes this.