CookieConsent

Frameworks & Libraries

Lightweight, framework-agnostic cookie consent banner.

Latest v3.1.0 · by Orest BidaWebsiteorestbida/cookieconsent

Changelog

v3.1.0Latest

cookieconsent v3.1.0

Added 1
  • Store language code of the consent in the cookie
Fixed 2
  • Fix service reject issue and setCookieData() method deleting lastConsentTimestamp field
  • Fix eraseCookies domain bug

From CookieConsent

Features
Bug fixes
Documentation
New Contributors

Full Changelog: https://github.com/orestbida/cookieconsent/compare/v3.0.1...v3.1.0

View originalPermalink
How v3.1.0 went
v3.0.1

cookieconsent v3.0.1

Fixed 2
  • Unhandled exception when category is unknown
  • Default enabled categories reset on preferences modal close

From CookieConsent

Bug fixes
Documentation
New Contributors

Full Changelog: https://github.com/orestbida/cookieconsent/compare/v3.0.0...v3.0.1

View originalPermalink
How v3.0.1 went
v3.0.0

cookieconsent v3.0.0

Added 5
  • Add granular control over scripts through services
  • Add support for external .json files for language and translation configuration
  • Add ESM format for easier integration with various frameworks
  • Add new customization options for button and modal layouts
  • Add multiple ways to handle scripts using script-tags, callbacks, or events
Changed 2
  • Redesign configuration parameters to be more intuitive and clearer
  • Improve language and translation handling
Removed 1
  • Remove compatibility with v2 configuration, API, and custom attributes

From CookieConsent

First stable v3 release! 🎉

Demo

You can check out v3 on the playground.

Main features
Upgrade guide from v2 to v3? ❌

There are way too many changes compared to v2; the configuration, api, custom attributes ... everything is different, although the end result is essentially the same. I personally find it faster to just start from scratch rather than trying to adapt the previous configuration.

Should you upgrade?

YES. Although v2 will still receive some maintenance updates, it will eventually be sunset.

Last but not least

A huge thanks to everyone who contributed!

View originalPermalink
How v3.0.0 went
v3.0.0-rc.17Pre-release

cookieconsent v3.0.0-rc.17

Added 1
  • Added new <service>.cookies option to easily erase cookies
Changed 2
  • Improved language autodetection process
  • Improved focus handling for accessibility
Fixed 1
  • Fixed default enabled categories ignored when mode='opt-in'

From CookieConsent

Features
  • Improved language autodetection process 1ec2561 (ref. #560) by @Diewy
  • Added new <service>.cookies option to easily erase cookies 526068838949aff31676aa2cb1ba912e7aef2d33 3655a1b2c3acf4341b58819256e68516f5beb71a
  • Improved focus handling (a11y) d8d73254353cec4fc6d30d3774fa0218777140d1 f3183936d81e2491fa2fbe555ecf5d341d033aa8
Bug Fixes
  • Fixed default enabled categories ignored when mode='opt-in' 8ad2d1d87b32bd3023176852edd65a61878e3a3c baf638099d36a312c68e9acb5718e7f4c54ddad1 (ref. #538) by @orestbida
Documentation
  • Updated code examples bf941a2efd098573405cddbf2ae8601ac758f083 0e9c87b20c972d18758a9856e48a23963730b424
  • Updated UI and Customization page 611affb96c5496174b77b3e1e52fee103ad74cb3
  • Fixed broken/outdated links 56865ae322488d84806c0532a26b7e7fe08eeb83 868c275c00dec96e4ac891d5e0bfd6837ee87032
  • Added notice about Google Ad related products 85f58084ae726e07b9a855790bde0ddd206af761
Misc
  • Updated playground f4b244e487741ce6e68d8bc259e5c176371817dc 8d1842939036ee38e0f9299dd25e860c245aec39
  • Updated demo examples 495df1537b23ca941413fe99796a0a8e632301f6
  • Updated all dependencies to latest version 0738397caf7e0570a01fe4f6c233365e9a2bbd81
New Contributors

Full Changelog: https://github.com/orestbida/cookieconsent/compare/v3.0.0-rc.16...v3.0.0-rc.17

View originalPermalink
How v3.0.0-rc.17 went
v2.9.2

cookieconsent v2.9.2

Added 1
  • Add .validConsent() method to easily check if consent is valid or not
Fixed 2
  • Fix accessibility issue caused by missing aria-level attribute
  • Fix .updateScripts() method doesn't work when mode is set to 'opt-out'

From CookieConsent

Bug Fixes
  • Fix a11y issue caused by missing aria-level attribute ecc9d6d (ref. #544)
  • Fix .updateScripts() method doesn't work when mode is set to 'opt-out' a2b9fb8 (ref. #556)
Features
  • Add .validConsent() method to easily check if consent is valid or not 7beb89b33440c279c19c6c62268efb168973aaf0

Full Changelog: https://github.com/orestbida/cookieconsent/compare/v2.9.1...v2.9.2

View originalPermalink
How v2.9.2 went
v3.0.0-rc.16Pre-release

cookieconsent v3.0.0-rc.16

Changed 1
  • Change the default button order so the accept button now precedes the reject button
Fixed 4
  • Fix cookie table header doesn't span full width
  • Fix equalWeightButtons does not default to true
  • Fix preferences modal bar layout is broken if button order is flipped
  • Fix yarn add issue caused by npx only-allow pnpm preinstall script

From CookieConsent

Breaking Changes
  • Change the default button order: accept button now precedes the reject button (previously reversed) cb9e3b8 (ref. #534)
Bug Fixes
  • Fix cookie table header doesn't span full width 9b882b8 (ref. #543) by @orestbida
  • Fix equalWeightButtons does not default to true 6596054 (ref. #541)
  • Fix preferences modal bar layout is broken if button order is flipped bb1a160 (ref. #539)
  • Fix yarn add issue caused by npx only-allow pnpm preinstall script fa01925 (ref. #548)
Docs
New Contributors

Full Changelog: https://github.com/orestbida/cookieconsent/compare/v3.0.0-rc.15...v3.0.0-rc.16

View originalPermalink
How v3.0.0-rc.16 went
v3.0.0-rc.15Pre-release

cookieconsent v3.0.0-rc.15

Changed 1
  • Clean up extraneous attributes to pass HTML validation

From CookieConsent

Enhancements
New Contributors

Full Changelog: https://github.com/orestbida/cookieconsent/compare/v3.0.0-rc.14...v3.0.0-rc.15

View originalPermalink
How v3.0.0-rc.15 went
v3.0.0-rc.14Pre-release

cookieconsent v3.0.0-rc.14

Added 5
  • Automatically discard unsaved preferences when preferencesModal is closed
  • Add cookieTable.caption for better accessibility
  • Allow custom z-index via --cc-z-index CSS variable
  • Allow custom type on external script tags via the data-type attribute
  • Add support for Safari 11.3+ (previously only 14+)
Changed 1
  • Disable transitions if prefers-reduced-motion is enabled
Fixed 4
  • Fix duplicate ids in the th tags
  • Fix error when a script tag with invalid category is found
  • Fix focus trap stops working after calling .setLanguage()
  • Fix css icon inconsistencies across different browsers by using svg icons

From CookieConsent

Bug Fixes
  • Fix duplicate ids in the th tags c2623fb8765a2d840e14821519f05cfbea8ea3df (ref. #483)
  • Fix error when a script tag with invalid category is found 30621705bfc40245927e5724fda962f03d3b178a (ref. #506)
  • Fix focus trap stops working after calling .setLanguage() 3d54c535f4d12cbb50b88c02772498714096d667
  • Fix css icon inconsistencies across different browsers: use svg icons f7fa35a2b0064f408222df622b14bd15123ef955 383a7a1c6467a190d54b83520496c3d8bae2a7eb
Features
  • Automatically discard unsaved preferences when preferencesModal is closed a51dd88254e53df978eb6110281cc60466710c25 (ref. #481)
  • Add cookieTable.caption for better a11y 35b3457069ac9aaa0a795f5679b5ff6edb1f972f a306cb37f7d2eaeb1c370a37b5b0b13918832846 (ref. #485)
  • Allow custom z-index via --cc-z-index 91e1877d2d2e07391fb72c83deca5177632fc0f6 (ref. #501)
  • Allow custom type on external script tags via the data-type attribute by @orestbida in https://github.com/orestbida/cookieconsent/pull/514
  • Disable transitions if prefers-reduced-motion is enabled 8a34f86f47b0d90246dcf356e18e25898742a33c
  • Add support for Safari 11.3+ (previously only 14+) 605ae6f0e5020c4088299b7fdcf72c8e39451e04 8c0112688bde234fe6b169dee84596a678d99571 (ref. #524)
Docs
Other
New Contributors

Full Changelog: https://github.com/orestbida/cookieconsent/compare/v3.0.0-rc.13...v3.0.0-rc.14

View originalPermalink
How v3.0.0-rc.14 went
v2.9.1

cookieconsent v2.9.1

Fixed 1
  • Fix wrong toggle states after opening and closing the settings modal

From CookieConsent

Bug Fixes
  • Fix wrong toggle states after opening and closing the settings modal by @orestbida in 952b5f59e0d074974e2f3b6163662e73c6d8f224 (ref. #516)
Misc
New Contributors

Full Changelog: https://github.com/orestbida/cookieconsent/compare/v2.9.0...v2.9.1

View originalPermalink
How v2.9.1 went
v2.9.0

cookieconsent v2.9.0

Added 7
  • Add new CSS variables
  • Allow custom script type via the data-type attribute
  • Add settings_modal.cookie_table_caption option for better accessibility
  • Allow custom z-index value via the --cc-z-index CSS variable
  • Allow data-cc attributes on all HTML elements
  • Disable transitions if prefers-reduced-motion is enabled
  • Discard unsaved settings inside settings_modal
Changed 1
  • Slightly reduce padding in UI
Fixed 1
  • Fix focus restoration when modals are hidden
Removed 1
  • Remove old IE8 specific CSS rules

From CookieConsent

New Features
  • Add new CSS variables by @aforcada in https://github.com/orestbida/cookieconsent/pull/482
  • Allow custom script type via the data-type attribute 0b1d14a69b980cbb3349dc8bc10a11b921a0ae4a (ref. #487)
  • Add settings_modal.cookie_table_caption option for better a11y bdfe84e161b3e6e633e9e4968a9d7558de7460a9 e1bada31aa2f39302081039aa2c13b1a9f544961 (ref. #485)
  • Allow custom z-index value via the --cc-z-index css variable 9707cceab03ce2998da6659abe80b8c1cb18403f
  • Allow data-cc attributes on all HTML elements e5ab6a0eb95ab4ef728d1b61596c1490ea40471c (ref. #502)
  • Disable transitions if prefers-reduced-motion is enabled fbfd628beea3361af4030e496776e70b2c4bb849
  • Discard unsaved settings inside settings_modal 4ef841d355eea315e0010ee55ee6914d91a6e916 (ref. #481)
Bug Fixes
  • Fix focus restoration when modals are hidden by @orestbida 004f6a3bb62e368fb1c0b0be1c0e03e491e40d6d (ref. #475)
Misc
  • Small ui tweaks: slightly reduce padding ff0c83cc2786a0470116044595399d64c72797c8 1296a6b80ecc586b25800b95fc8246acbe93236d
  • Fix Readme.md example: hide_from_bots is true by default rather than false by @MaximumP in https://github.com/orestbida/cookieconsent/pull/448
  • Remove old IE8 specific css rules c350c9eb53ee888dc54f22c706a2431e522ae143
  • Update all dependencies 13072d42d3bb120cfe5b4487794a4003f05faf0a
  • Code refactoring/cleanup
New Contributors

Full Changelog: https://github.com/orestbida/cookieconsent/compare/v2.8.9...v2.9.0

View originalPermalink
How v2.9.0 went
View all

Discussion

If you publish CookieConsent, you can claim this product by proving you administer its repository.