浏览器指纹 fingerprintjs
使用示例:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <input value="" id="input" style="width: 300px;" /> <div id="user"></div> <script> const fpPromise = import('https://openfpcdn.io/fingerprintjs/v3') .then(e => e.load()) fpPromise .then(fp => fp.get()) .then(result => { const visitorId = result.visitorId console.log(visitorId) document.getElementById('input').value = visitorId document.getElementById('user').innerHTML = window.navigator.userAgent.toLowerCase() }) </script> </body> </html>
官方:
https://github.com/fingerprintjs/fingerprintjs
.