
Lightweight Cookie Notice JS

Description

Lightweight Cookie Notice JS is a vanilla JavaScript script that provides an easy way to display a cookie notice on your website.
This JavaScript cookie notice integrates a high number of style customization options, support for multiple cookie categories, geolocation, and other valuable features.
Note that this product is also available as a WordPress plugin. For more information, see Lightweight Cookie Notice.
Optimized for performance
We created this script with fast and efficient JavaScript code, and no additional JavaScript libraries or CSS files need to be loaded. There is only one 8kb script (gzipped) that generates the cookie notices on the DOM, adds the event listeners, and applies the styles.
For the reasons above, we recommend this product for high-performance websites or high-traffic websites.
Collect the cookie consent for multiple categories
With the script options, you can configure an unlimited number of cookie categories. In the cookie settings, an activation toggle will be presented to the user for each category.
We have also included JavaScript and PHP methods to read the cookie consent status of the categories. So you can run specific scripts based on the consent provided by the users. More details on the use of these methods are available in the Status section of the plugin manual.
Geolocation
You can display the cookie notice only to the users located in a custom list of countries. The geolocation is performed with the GeoLite2 database or with HostIp.info.
Multiple positions
The cookie notice can be positioned at the bottom of the screen, at the top of the screen, or at the center of the screen as a modal window.
Additional features
The following additional features are also available:
- An optional mask that blocks the interactions with the website.
- An optional shake effect that brings attention to the cookie notice.
- An optional refresh of the page for the users that accept the cookie notice.
- Custom colors for the backgrounds of the elements, for the borders, for the typefaces, for the masks, and more.
- Ability to use your custom font family to create consistency with the style of your website. You can set different font families for the headings, the body, and the buttons.
- Ability to control the border width and the border radius of containers and buttons.
- Ability to set the opacity of the masks, backgrounds, and borders.
- Ability to set the shadows of the containers.
- The ability to include custom HTML in the cookie notice and the cookie settings modal window.
- The ability to have HTML tables with information about the cookies in the cookie settings modal window.
Quickly implement the JavaScript Cookie Notice
The basic implementation of this script requires only one line of code:
lwcnCookieNotice.initialize();
Cookie notice options
This script comes with a total of 100 options. The complete list of option is available in the plugin demo and in the plugin manual.
Credits
This product makes use of the following resources:
- GeoIP2 PHP API licensed under the Apache License 2.0
- MaxMind DB Reader PHP API licensed under the Apache License 2.0
- Common Code for MaxMind Web Service Clients licensed under the Apache License 2.0
- Composer licensed under the MIT License
Disclaimer
This product can include GeoLite2 data created by MaxMind, available from https://www.maxmind.com.
Categories
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit🥇
STOP GUESSING WHAT TO POST
AI that learns your brand voice and builds a month of consistent, on-brand social content: carousels, posts and hooks that sound like you, not like everyone else's AI.
SaaS · 4,299 views · 38 clicksSaaS · Week 45 · 4,299 views · 38 clicks
🥈
Conversational Backlinks for Busy Founders
Place Backlink Relevant Conversation for your domain across Forums and Conversations
Website · 42,021 views · 223 clicksWebsite · Week 45 · 42,021 views · 223 clicks
🥉
upvote.club
Free Social Media Engagement that Helps Boost Your Content. Upvote Club supports 19 social networks with 100+ engagement actions in one dashboard. Add links to your posts and get free engagement from real users.
SaaS · 40,065 views · 117 clicksSaaS · Week 45 · 40,065 views · 117 clicks
#4
Substack Posting API
Onboard your Agent to Substack. Write Publish on Substack via API
SaaS · 59,074 views · 198 clicksSaaS · Week 45 · 59,074 views · 198 clicks
#5
Seenshot App
Free, Fast, MacOS Screenshot app. Make Screenshot cmd+shift+2 and send it via link
Desktop App · 28,449 views · 122 clicksDesktop App · Week 45 · 28,449 views · 122 clicks
#6
Hand-Placed Backlinks $9.99 per link. Flat rate.
Buy hand-placed forum, Q-A and directory backlinks. Flat $9.99 per link, no subscriptions — you only pay for approved listings.
Website · 4,282 views · 19 clicksWebsite · Week 45 · 4,282 views · 19 clicks
#7
Free Invoice Generator - PDF Invoices in Your Browser, No Sign-Up
A free invoice maker for freelancers and small businesses: fill in the invoice, check the live preview, and download a PDF that looks exactly like it. Any currency, tax per item, three templates, no sign-up, and nothing leaves your device.
2,957 views · 17 clicksWeek 45 · 2,957 views · 17 clicks
#8
Merge PDF Files Free - Combine PDFs in Your Browser, No Upload
A free PDF merger for office workers, students, and freelancers: combine PDFs and images into one file in the browser, reorder files and pages, pick page ranges, keep bookmarks, and open password-protected PDFs. Nothing is uploaded, no sign-up, no watermark.
2,730 views · 13 clicksWeek 45 · 2,730 views · 13 clicks