Cookie Banner Javascript - Build It Without Libraries

Sdílet
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...

Komentáře • 17

  • @ancrocha
    @ancrocha Před 9 měsíci

    Thank you so much for the tutorial. I am executing the exact same code in my project called trabifinance...

  •  Před rokem

    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.

  • @TheDenisukm
    @TheDenisukm Před rokem

    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

  • @chrisross6929
    @chrisross6929 Před rokem

    Any chance to get a copy of your code for the cookies popup - best explanation I have seen

  • @Selfmade95
    @Selfmade95 Před 3 měsíci

    What‘s this on 8:35 ?

  • @BrockFredin
    @BrockFredin Před 2 lety +1

    These popups are polluting the Internet.

  • @missulu
    @missulu Před rokem

    We don't use cookies. No banner needed!lol!

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  Před rokem +1

      Sure. But most often they are used.

    • @davebudah
      @davebudah Před rokem

      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.

    • @missulu
      @missulu Před rokem +2

      @@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!

    • @sebastianmakowski2710
      @sebastianmakowski2710 Před rokem

      @@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

    • @missulu
      @missulu Před rokem

      @@MonsterlessonsAcademy Almost always...