Thank you for sharing Vicky! I'd like to add something important, which is not strictly related to tech:
A cookie notice, at least those that comply with GDPR, don't just tell users the site uses cookies. It also asks them for permission to use them. In fact, the site should not create cookies or data in local storage until the user accepts them (except for cookies that are necessary for the site to work.)
It means that the banner actually requires two buttons: one to accept cookies and another to reject them.
Thanks Nico for your feedback. Yes, no worries, this is just a sample of showing how you can make a cookie without an npm package and how you can use localstorage. But again thanks.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you for sharing Vicky! I'd like to add something important, which is not strictly related to tech:
A cookie notice, at least those that comply with GDPR, don't just tell users the site uses cookies. It also asks them for permission to use them. In fact, the site should not create cookies or data in local storage until the user accepts them (except for cookies that are necessary for the site to work.)
It means that the banner actually requires two buttons: one to accept cookies and another to reject them.
Thanks Nico for your feedback. Yes, no worries, this is just a sample of showing how you can make a cookie without an npm package and how you can use localstorage. But again thanks.