3 ms·
>We were astonished to discover that 87% of cookie accesses were redundant... er. really? it has no "it has been updated" event, polling it even when unnecessa
by Groxx 2y ago
>We were astonished to discover that 87% of cookie accesses were redundant...
er. really? it has no "it has been updated" event, polling it even when unnecessary is kinda the only option. honestly I'm surprised it's only 87%, I would've bet it was much closer to 99%. tbh it makes me wonder if there's some incorrect caching going on in some popular frameworks.
>... and that, in some cases, this could happen hundreds of times per second.
ignoring intentional stuff like cross-tab communication via cookies (there are much better options nowadays, but not all code has switched), yeah - also not all that surprising, but definitely one of those "... but why?" discoveries.
- rob74 2y ago... and now that they made it faster, the authors of popular frameworks can get away with even worse mistakes. Hooray for progress!
- kevingadd 2y agoBetween "this framework was requesting cookie data too often" and "this framework was incorrectly caching cookies and causing weird data inconsistency errors that frustrate users" the former is probably better, and they fixed that. The latter is something that isn't straightforward to fix without introducing the former issue.
- Groxx 2y ago100% agreed, I would much rather have things just hammer the browser and be trivially correct. Far easier to debug and layer in a cache if needed when you know your specific case, rather than trying to debug a flawed cache.