Home  >  Q&A  >  body text

How to get the computer's device number with JS? mac address

How to get the physical address of the computer in js. Or how to determine user uniqueness in general.

黄舟黄舟2713 days ago1246

reply all(4)I'll reply

  • 某草草

    某草草2017-05-18 10:58:37

    一般通过用户名,用户访问时的IP地址

    reply
    0
  • 大家讲道理

    大家讲道理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

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新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.

    reply
    0
  • 黄舟

    黄舟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).

    reply
    0
  • Cancelreply