Cookie Banner Javascript - Build It Without Libraries
Vložit
- čas přidán 26. 07. 2024
- Learn how to create cookie consent popup with just HTML, CSS and Javascript. There lots of cookie banner examples in internet in different libraries which are not flexible or ugly. You don't need them. In 10 minutes you will create your own cookie banner with any styling and logic that you want.
TIMESTAMPS
0:00 Introduction
0:29 Cookie banner library
1:33 Writing markup for cookie consent banner
4:27 Writing javascript for cookie consent popup
9:41 Hiding a cookie banner
► CHECK MY COURSES - monsterlessons-academy.com/co...
FOLLOW ME
► TWITTER - / monster_lessons
REFERENCES
► Source code - github.com/monsterlessonsacad...
RECOMMENDED VIDEOS
► My editor setup for web development - • Best Text Editor for W...
► Angular Tutorial for Beginners - • Angular Tutorial for B...
► Vue JS Crash Course - • Vue JS Crash Course fo...
► React Hooks Full Course - • React Hooks Tutorial f...
► Typescript Course for Beginners - • Typescript Crash Cours...
► Build a Todo App with Angular - • Build a Todo App With ...
► Creating custom select library - • Custom Javascript Drop...
► HTML Price comparison - • Practice CSS and HTML ...
► How to build Quiz with React hooks - • How to Build a Quiz Wi...
MY COURSES
► NestJS course - • Nest JS Project From S...
► Docker + Docker compose course - • Docker Compose Tutoria...
► Angular + NgRx course - • Angular Course 2021 - ...
► Vue + Vuex course - • Vue Course With Projec...
► React hooks course - • React Hooks tutorial b...
Thank you so much for the tutorial. I am executing the exact same code in my project called trabifinance...
Glad it was helpful!
I tried out this tutorial but the pop-up appears on every page on refresh, not sure why as I don't have cookies blocked.
Hi there. Thank you for the very good guide. Do you somehow have a tutorial, from where we can learn how to inject the GA4 script, from an external script / file, to the head, only after the user's acceptance? :D
Unfortunately no :(
Any chance to get a copy of your code for the cookies popup - best explanation I have seen
The source code is always in the description
What‘s this on 8:35 ?
These popups are polluting the Internet.
Yes but this the task that you get everyday.
We don't use cookies. No banner needed!lol!
Sure. But most often they are used.
Well if you are a web dev you should know that, it is a requirement to put the cookie consent banner/modal. You might think its not necessary till you face a legal crisis with clients.
@@davebudah Actually in America, there is no such law. I agree with the first guy, cookies are a problem they allow people to follow you all over the internet. That's why we don't use them!
@@missulu no cookies in most of the time are needed to make website working good, yes you HAVE, but there are no policys, so they don't ask you for permit
@@MonsterlessonsAcademy Almost always...