4 ms·
Well it's open-source, so you can have a look: https://github.com/kiprotect/klaro https://github.com/kiprotect/klaro It uses Preact and a few JS helper librar
by ThePhysicist 6y ago
Well it's open-source, so you can have a look:
https://github.com/kiprotect/klaro https://github.com/kiprotect/klaro
It uses Preact and a few JS helper libraries and includes translations for more than 10 languages currently. It also includes styles by default (though you can get a version without styles). The compressed size is 37 kB which I think is reasonable, smaller is of course better. We haven't prioritized size for now as it's comparable to a PNG/JPG and usually negligible on most sites, we might look into this in the future though.
- jsf01 6y agoThe parsing cost for 100+ kB of JavaScript is not negligible. Sure maybe the transfer over the network is comparable to an image file, but you can’t stop measuring there. And to claim “Lightweight” on the homepage for something that should be tiny when uncompressed is a bit of a stretch—lightweight compared to what?
- ThePhysicist 6y agoYes I guess we should update the site. When we started it was less than 20 kB (compressed), seems we have almost doubled in size! We added some functionality and additional languages over time, I will check the bundle though to see what takes up so much space, seems high to me as well. We’re developing this pro bono right now and don’t intend to monetize it, hence it does not always get the attention it might deserve.