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).
一般通过用户名,用户访问时的IP地址
Use the current browser type + browsing version number + current IP + operating system type + operating system version to make a hash
The front-end cannot get it, please ask the back-end for help, and I will get it and send it to you.
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).