Java Fingerprinting
Background
The existence of Java on a device has been used as a device fingerprint element since fingerprinting has existed. While Java has been on the decline on clients given the release of HTML4, there is still enough installations to use it as an element in the device fingerprint.
How It Works
This device fingerprint simply queries the javaEnable property and returns true all false. While the fingerprint is simple, users don't tend to change the install state of Java frequently so it tends to be a very stable data point in the device fingerprint.
Entropy Estimate: 1.0 bits
Code
The javascript function below fingerprints the existence of Java on the device.
Source Code
function fingerprint_java() {
"use strict";
var strOnError, strJavaEnabled, strOut;
strOnError = "Error";
strJavaEnabled = null;
strOut = null;
try {
if (navigator.javaEnabled()) {
strJavaEnabled = "true";
} else {
strJavaEnabled = "false";
}
strOut = strJavaEnabled;
return strOut;
} catch (err) {
return strOnError;
}
}
Validation
Unlike other code on the Internet we do everything possible to verify our code for you. In order to minimize problems and maximize compatibility this code has been verified with JSLint and has been extensively tested with over 1100 OS/Browser combinations using BrowserStack.
Reference
NavigatorPlugins.javaEnabled() (Feb 22, 2015). In MDN web docs. Retrieved September 01, 2017, from https://developer.mozilla.org/en-US/docs/Web/API/NavigatorPlugins/javaEnabled
navigator object (n.d.). In Microsoft Developer Network. Retrieved September 01, 2017, from https://msdn.microsoft.com/en-us/library/ms535867(v=vs.85).aspx