The Canvas API, used for drawing graphics, can also be exploited for online tracking through browser fingerprinting. By analyzing how canvas images are rendered on different browsers and platforms, a unique digital fingerprint of a user’s browser can be created. Factors such as font rendering settings and anti-aliasing algorithms contribute to the uniqueness of the fingerprint. A JavaScript code example demonstrates how variations in image rendering can lead to distinct frames among different users. Extracting pixels using the toDataURL() function allows for the computation of a canvas fingerprint through MD5 hash or CRC checksum from PNG files. This method raises privacy concerns regarding online tracking.
https://browserleaks.com/canvas