IndexedDB Fingerprinting
Background
In HTML5, IndexedDB is a way for you to persistently store data inside a user's browser. Because it lets you create web applications with rich query abilities regardless of network availability, your applications can work both online and offline. It is also only supported in more modern browser versions, so it's a ripe target to use as a fingerprint.
How It Works
This is a rather simple way to determine is the indexedDB method exists. When calling !!window.indexedDB and error will indicate it exists, while no error will indicate it does not exist.
Entropy Estimate: 1 bit
Code
The JavaScript function below fingerprints the existence of indexedDB for the device.
Note: Depending on your output method you may need to URL encode the returned results.
Source Code
function fp_indexedDB() {
"use strict";
var strOnError, strOut;
strOnError = "<indexedDB>true</indexedDB>";
strOut = "";
try {
strOut = "<indexedDB>" + !!window.indexedDB + "</indexedDB>";
return strOut;
} catch (err) { // Error when referencing it confirms existence
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
Using IndexedDB (2018). Retrieved June 18, 2018, from https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB