I didn't feel good about sending 100KB+ for a simple cookie consent solution so I wrote my own in vanilla JS. It's around <5kB compressed with brot

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-06-08 13:00:08

I didn't feel good about sending 100KB+ for a simple cookie consent solution so I wrote my own in vanilla JS. It's around <5kB compressed with brotli.

The goal was to make something as small as possible and versatile enough that I could drop it on my optimized sites for basic analytics.

This is a brand new pre-1.0 project and needs more testing and iteration, and isn't going to suit all circumstances yet, although I'm using it on live sites.

There are number of features we might want to add, such as forcing the popup to show and not allow use of the site until consent choice is made.

Leave a Comment