Browser Fingerprinting

Browser Fingerprinting

10月 22, 2024 · 1 分钟阅读时长 · 109 字 · -阅读 -评论

With logged‑in users, identification is trivial. For anonymous users, we can use a browser fingerprint — a unique identifier derived from available device/browser attributes at a point in time. JS doesn’t expose “a fingerprint” directly; you have to compute it (libraries like FingerprintJS help).

FingerprintJS v3

Latest is v4, but v4 uses BSL (becomes MIT after 4 years). In 2024, v4 isn’t MIT yet, so v3 (MIT) is the safe open‑source choice.

Accuracy

  • OSS accuracy ~40–60%; commercial ~99.5% (with server‑side components).
  • Fingerprints often remain stable only for weeks.

Usage

const fpPromise = new FingerprintJS.load();
    fpPromise
      .then(fp => fp.get())
      .then(result => {
        const visitorId = result.visitorId;
        console.log(visitorId)
      })

References

Alan H
Authors
开发者,数码产品爱好者,喜欢折腾,喜欢分享,喜欢开源