3 ms·
I wrote the pixel tracker for a big corporation, which tracks a ton of hits for many top sites. 1) Using Math.random() to generate a UUID, is not a UUID. There
by latchkey 15y ago
I wrote the pixel tracker for a big corporation, which tracks a ton of hits for many top sites.
1) Using Math.random() to generate a UUID, is not a UUID. There are plenty of JS uuid generators out there. Please use one.
2) Why are you returning a header with what is being tracked?
3) Please please please use coffeescript.
- pork 15y agoAbout (1), your uuid is random with a good math.random() and a sufficiently long string with high probability (using that as a technical term from theoretical cs). So I assume that your gripe is that math.random() has bad implementations. Recall the article recently on how a deck of shuffled cards is unique in human history? Apply same logic.
- asktell 15y ago3) Why use CoffeeScript in this instance? I don't see this being a valid criticism of any JavaScript project, let alone one so trivial. Comma prefixing on the other hand...