I wanted recongnize the device as unique, even if we are using multiple browser how can we generate or get an same unique deivceID in browser with javascript.
Yes we cannot get MAC address and CPU serial number through javascript because it's an very high level language.
so is there any work around to get an unique device ID.
CodePudding user response:
You cannot get the details of user's hardware via browser APIs. This is restricted for security purposes.
However, there is a technique called Canvas Fingerprinting which is used to identify unique users by analyzing how their computer hardware manipulates a canvas element on the browser. I would highly recommend looking into this solution as a way for you to identify unique users via their devices.
CodePudding user response:
A simple solution is to serve a cookie with an unique code, and when the user comes back, you can read it again and compare it to the one in your database.