Built-in entropy sources for collecting browser and device characteristics across 41 different detection methods, organized by functional category.
All entropy sources return data in a standardized component format that includes either successful values or error information along with timing data.
interface Component<T> {
value: T;
duration: number;
} | {
error: unknown;
duration: number;
}
type UnknownComponents = Record<string, Component<unknown>>;Analyzes audio context characteristics for fingerprinting.
// Component name: 'audio'
// Returns: number (audio fingerprint hash)Collects audio context fingerprints using oscillator nodes, dynamics compressors, and audio processing characteristics unique to each device and browser combination.
Detects audio context base latency for timing-based fingerprinting.
// Component name: 'audioBaseLatency'
// Returns: number | undefinedMeasures the base latency of the audio context, which varies by audio hardware and driver configurations.
Generates canvas-based fingerprints through rendering operations.
// Component name: 'canvas'
// Returns: CanvasFingerprint object with winding, geometry, and text properties
interface CanvasFingerprint {
winding: boolean;
geometry: string;
text: string;
}Creates a canvas fingerprint by rendering text, gradients, and shapes, then extracting pixel data. Variations occur due to graphics drivers, hardware acceleration, and anti-aliasing differences.
Collects basic WebGL renderer and context information.
// Component name: 'webGlBasics'
// Returns: WebGL parameter object with renderer, vendor, and capability information
interface WebGLBasics {
renderer: string;
vendor: string;
// Additional WebGL parameters
}Enumerates available WebGL extensions.
// Component name: 'webGlExtensions'
// Returns: string[] | undefinedLists all supported WebGL extensions, which vary significantly between graphics hardware and driver versions.
Detects available system fonts.
// Component name: 'fonts'
// Returns: Promise<string[]>Identifies installed fonts by attempting to render text and measuring width variations. Font availability is highly distinctive across different systems and installations.
Analyzes font rendering preferences and characteristics.
// Component name: 'fontPreferences'
// Returns: Font preference object with various rendering metrics
interface FontPreferences {
default: number[];
apple: number[];
serif: number[];
sans: number[];
mono: number[];
// Additional font measurements
}Captures screen resolution and pixel density information.
// Component name: 'screenResolution'
// Returns: [number | null, number | null] | undefinedMeasures screen frame dimensions and available screen real estate.
// Component name: 'screenFrame'
// Returns: Screen frame measurements
interface ScreenFrame {
availTop: number;
availLeft: number;
availWidth: number;
availHeight: number;
// Additional frame properties
}Determines the color depth of the display.
// Component name: 'colorDepth'
// Returns: numberDetects supported color gamut capabilities.
// Component name: 'colorGamut'
// Returns: stringIdentifies color gamut support (sRGB, P3, rec2020) through CSS media queries.
Measures monochrome display capabilities.
// Component name: 'monochrome'
// Returns: numberIdentifies the operating system platform.
// Component name: 'platform'
// Returns: stringExtracts OS and CPU information from navigator properties.
// Component name: 'osCpu'
// Returns: string | undefinedDetects CPU architecture when available.
// Component name: 'architecture'
// Returns: string | undefinedIdentifies CPU class information (legacy browsers).
// Component name: 'cpuClass'
// Returns: string | undefinedReports the number of logical processors.
// Component name: 'hardwareConcurrency'
// Returns: number | undefinedIndicates approximate device memory in gigabytes.
// Component name: 'deviceMemory'
// Returns: number | undefinedIdentifies the browser vendor.
// Component name: 'vendor'
// Returns: stringDetects vendor-specific browser features and flavors.
// Component name: 'vendorFlavors'
// Returns: string[]Enumerates browser plugins (legacy browsers).
// Component name: 'plugins'
// Returns: Plugin information array
interface PluginInfo {
name: string;
description: string;
mimeTypes: string[];
}Tests local storage availability and functionality.
// Component name: 'localStorage'
// Returns: booleanTests session storage availability.
// Component name: 'sessionStorage'
// Returns: booleanChecks IndexedDB availability and support.
// Component name: 'indexedDB'
// Returns: booleanTests WebSQL database availability (deprecated).
// Component name: 'openDatabase'
// Returns: booleanDetects inverted colors accessibility preference.
// Component name: 'invertedColors'
// Returns: booleanIdentifies forced colors mode (high contrast).
// Component name: 'forcedColors'
// Returns: booleanDetermines contrast preference settings.
// Component name: 'contrast'
// Returns: stringChecks for reduced motion accessibility preference.
// Component name: 'reducedMotion'
// Returns: booleanDetects reduced transparency preference.
// Component name: 'reducedTransparency'
// Returns: booleanIdentifies HDR display support.
// Component name: 'hdr'
// Returns: booleanAnalyzes touch input capabilities and characteristics.
// Component name: 'touchSupport'
// Returns: Touch support information
interface TouchSupport {
maxTouchPoints: number;
touchEvent: boolean;
touchStart: boolean;
}Tests if cookies are enabled and functional.
// Component name: 'cookiesEnabled'
// Returns: booleanChecks if PDF viewing is enabled in the browser.
// Component name: 'pdfViewerEnabled'
// Returns: booleanCollects browser language preferences.
// Component name: 'languages'
// Returns: [primary: string, list: string[]]Determines the system timezone.
// Component name: 'timezone'
// Returns: stringAnalyzes date and time locale formatting characteristics.
// Component name: 'dateTimeLocale'
// Returns: Locale formatting information
interface DateTimeLocale {
// Various locale-specific formatting results
[key: string]: string;
}Detects ad blockers and DOM manipulation tools.
// Component name: 'domBlockers'
// Returns: DOM blocker detection results
interface DOMBlockers {
// Results of various blocker detection tests
[blockerName: string]: boolean;
}Checks for Private Click Measurement support (Safari).
// Component name: 'privateClickMeasurement'
// Returns: booleanTests Apple Pay availability and support.
// Component name: 'applePay'
// Returns: booleanGenerates mathematical operation fingerprints.
// Component name: 'math'
// Returns: Mathematical computation results
interface MathFingerprint {
// Results of various mathematical operations that may vary by implementation
[operation: string]: number;
}Accessing Individual Sources:
const fp = await FingerprintJS.load();
const result = await fp.get();
// Check canvas fingerprint
if ('value' in result.components.canvas) {
console.log('Canvas fingerprint:', result.components.canvas.value);
}
// Analyze font detection results
if ('value' in result.components.fonts) {
const detectedFonts = result.components.fonts.value as string[];
console.log(`Detected ${detectedFonts.length} fonts:`, detectedFonts);
}Source Performance Analysis:
// Analyze source collection performance
const sources = Object.entries(result.components);
const slowSources = sources
.filter(([_, component]) => component.duration > 50)
.sort(([_, a], [__, b]) => b.duration - a.duration);
console.log('Slowest entropy sources:', slowSources);Error Handling for Sources:
// Handle source collection errors
const failedSources = Object.entries(result.components)
.filter(([_, component]) => 'error' in component)
.map(([name, component]) => ({ name, error: component.error }));
if (failedSources.length > 0) {
console.warn('Failed entropy sources:', failedSources);
}