How to get the physical address of the computer in js. Or how to determine user uniqueness in general.
大家讲道理2017-05-18 10:58:37
Use the current browser type + browsing version number + current IP + operating system type + operating system version to make a hash
曾经蜡笔没有小新2017-05-18 10:58:37
The front-end cannot get it, please ask the back-end for help, and I will get it and send it to you.
黄舟2017-05-18 10:58:37
Simple method: UserAgent + IP. The disadvantage is: For example, if a company, school or other group uses the same computer/browser and the export IP is the same, it will be considered the same one.
Or: When the user makes the first request, the backend generates a unique token and puts it in the cookie. Every time there is a new request, first determine whether there is a token in the cookie. The disadvantage is: if the user clears the browser cache, they will think they are a new user.
As for obtaining the mac address through js, it seems that only certain versions of IE support it (you can check for details).