The collection of a large amount of diverse and stable information from web browsers is possible for most part due to
client-side scripting languages, which were introduced in the late 1990s. Today there are several open-source browser fingerprinting libraries, such as FingerprintJS, ImprintJS, and ClientJS, where FingerprintJS is updated the most often and supersedes ImprintJS and ClientJS to a large extent.
Browser version Browsers provide their name and version, together with some compatibility information, in the User-Agent request header. Being a statement freely given by the client, it should not be trusted when assessing its identity. Instead, the type and version of the browser can be inferred from the observation of quirks in its behavior: for example, the order and number of
HTTP header fields is unique to each browser family and, most importantly, each browser family and version differs in its implementation of
HTML5,
CSS and
JavaScript. Such differences can be remotely tested by using JavaScript. A
Hamming distance comparison of
parser behaviors has been shown to effectively fingerprint and differentiate a majority of browser versions.
Browser extensions A combination of
extensions or
plugins unique to a browser can be added to a fingerprint directly. Extensions may also modify how any other browser attributes behave, adding additional complexity to the user's fingerprint.
Adobe Flash and
Java plugins were widely used to access user information before their deprecation.
Hardware properties User agents may provide system hardware information, such as phone
model, in the HTTP header. Properties about the user's
operating system,
screen size,
screen orientation, and
display aspect ratio can be also retrieved by using
JavaScript to observe the result of
CSS media queries.
Browsing history The fingerprinter could determine which sites the browser had previously visited within a list it provided, by querying the list using JavaScript with the CSS selector . Typically, a list of 50 popular websites were sufficient to generate a unique user history profile, as well as provide information about the user's interests. However, browsers have since then mitigated this risk.
Font metrics The letter bounding boxes differ between browsers based on
anti-aliasing and
font hinting configuration and can be measured by JavaScript.
Canvas and WebGL Canvas fingerprinting uses the HTML5
canvas element, which is used by
WebGL to render 2D and 3D graphics in a browser, to gain identifying information about the installed
graphics driver,
graphics card, or
graphics processing unit (GPU). Canvas-based techniques may also be used to identify installed
fonts. Furthermore, if the user does not have a GPU,
CPU information can be provided to the fingerprinter instead. A canvas fingerprinting script first draws text of specified font, size, and background color. The image of the text as rendered by the user's browser is then recovered by the ToDataURL Canvas API method. The hashed text-encoded data becomes the user's fingerprint. Canvas fingerprinting methods have been shown to produce 5.7 bits of entropy. Because the technique obtains information about the user's GPU, the information entropy gained is "orthogonal" to the entropy of previous browser fingerprint techniques such as screen resolution and JavaScript capabilities.
Hardware benchmarking Benchmark tests can be used to determine whether a user's CPU utilizes
AES-NI or
Intel Turbo Boost by comparing the
CPU time used to execute various simple or
cryptographic algorithms. Specialized
APIs can also be used, such as the Battery API, which constructs a short-term fingerprint based on the actual battery state of the device, or OscillatorNode, which can be invoked to produce a waveform based on user entropy. A device's hardware ID, which is a
cryptographic hash function specified by the device's
vendor, can also be queried to construct a fingerprint. ==Mitigation methods for browser fingerprinting==