0

I have my PC extension for google chrome, the extension is something like Sync ( Bookmarks, tabs etc). In order to associate each Bookmark and tab with the PC/Desktop/Machine on which it got created/modified. For which i may have to generate my own unique id along with ( for ex:- SerialNo_myown_unique, CPU_No_Myown_unique, MAC_addr_Myownuniqueno etc). So all i want to know is, how do i generate this using Javascript, as most of the blogs and articles i explored have not given clear instructions about how to do it?

Can someone help?

abraham
  • 46,583
  • 10
  • 100
  • 152
Vinodkumar
  • 292
  • 1
  • 4
  • 14
  • It's not even clear what that extension is and what exactly it does with the id or what is the exact format. Unless you edit the question and provide the specifics it will be closed eventually. – wOxxOm Oct 20 '15 at 11:11
  • Also, use search: [javascript identify computer](http://stackoverflow.com/search?q=%5Bjavascript%5D+identify+computer) – wOxxOm Oct 20 '15 at 11:18
  • 1
    Possible duplicate of [Create GUID / UUID in JavaScript?](http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript) – rsanchez Oct 20 '15 at 13:47

1 Answers1

4

node-uuid will generate RFC compilant UUID strings for you. While these won't depend on the machine they are generated on I don't see why that should be necessary. You can generate a machine uuid once when your extension is installed and associate that with a user account on your service.

Alternatively you could just handle this on your server and request an id from the server after the user logs into his or her account after the extension has been installed.

In general, what you are looking for is called device fingerprinting and is a rather large issue for privacy. That is also why it's (thankfully) rather hard and imprecise to do. The Mozilla Wiki has an interesting collection on some techniques. You can test how unique your browser configuration is on Panopticlick.

Stephan Klein
  • 1,177
  • 11
  • 20