How to identify unique devices using javascript?

Amged picture Amged · Jul 28, 2019 · Viewed 16.1k times · Source

I was wondering how streaming service providers like Netflix, Hulu, Sling.. et identify my device when I login using web Browser on my labtop.
I couldn't find any Javascript APIs to get a GUID or so.

Answer

Hisham___Pak picture Hisham___Pak · Jul 28, 2019

You can use the fingerprintJS2 library for your project too.

https://fingerprintjs.com/

How this library gets fingerprints

Fingerprint.js collects all the unique features from a device/browser passing them through a hash function to provide a unique identifier.

Example enter image description here

There are many other ways to get unique browser fingerprint.

The newest method to obtain browser information is called “Canvas Fingerprinting.” Simply put, websites are written in HTML5 code, and inside that code, there is a little piece of code that takes your browser’s fingerprint.

So, how are websites doing that, exactly? Let me explain.

This new tracking method that websites employ to obtain your browser fingerprint is enabled by new coding features in HTML5.

HTML5 is the coding language used to build websites. It’s the core fundamentals of every website. Within the HTML5 coding language, there’s an element which is called “canvas.”

Originally, the HTML element was used to draw graphics on a web page.

Wikipedia provides the following explanation on how exploiting the HTML5 canvas element generates browser fingerprinting:

“When a user visits a page, the fingerprinting script first draws text with the font and size of its choice and adds background colors. Next, the script calls Canvas API’s ToDataURL method to get the canvas pixel data in dataURL format, which is basically a Base64 encoded representation of the binary pixel data. Finally, the script takes the hash of the text-encoded pixel data, which serves as the fingerprint."

In plain English, what this means is that the HTML5 canvas element generates certain data, such as the font size and active background color settings of the visitor’s browser, on a website. This information serves as the unique fingerprint of every visitor.

In contrast to how cookies work, canvas fingerprinting doesn’t load anything onto your computer, so you won’t be able to delete any data, since it’s not stored on your computer or device, but elsewhere.

Source and further reading: https://pixelprivacy.com/resources/browser-fingerprinting/

https://multilogin.com/everything-you-need-to-know-about-canvas-fingerprinting/

By the way you can get much more information from Googling yourself.