View on GitHub

Cookiealert.js

Simple cookie compliance

Download this project as a .zip file Download this project as a tar.gz file

cookiealert.js

A tiny JavaScript library for displaying implicit consent cookie messages. It differs from other solutions in that it aims to be accessible.

We found that too many of the solutions already out there relied on over libraries, or provided kitchen-sink functionality way beyond the needs of most site owners. We wanted something small, simple and elegant.

It — ironically — sets a cookie to store visitor consent and is designed to work without the need for any third-party JavaScript libraries.

Features

How to use

All you need to do is include the cookiealert.min.js script, then see the markup contained in index.html or index.php for usage examples. We've also included some sample CSS for styling your alert message.

We'll add more documentation in the near future, as the code gets improved and refined.

Extras

You'll also find some sample copy for your privacy / cookie pages in privacy.html.

Authors