robsd / js-cookie-banner

A simple cookie banner implementation, saving the user's consent in the browser storage to prevent the banner showing on every page load.

Home Page:https://robsd.github.io/js-cookie-banner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

js-cookie-banner 🍪

A simple cookie banner implementation, saving the user's consent in the browser storage to prevent the banner showing on every page load.

Getting setup

  1. Download and extract this repo.
  2. Copy the code into your website.
  3. If you want to make it stick to the bottom of the page, add the classes position-fixed bottom-0 start-0 w-100 to the alert element in the index.html file (optional).

Demo

https://robsd.github.io/js-cookie-banner

Support my work

If you like this repo or used any of the code, please star ⭐ it and consider supporting me below...

ko-fi

About

A simple cookie banner implementation, saving the user's consent in the browser storage to prevent the banner showing on every page load.

https://robsd.github.io/js-cookie-banner

License:MIT License


Languages

Language:HTML 76.8%Language:JavaScript 23.2%