Gathering detailed insights and metrics for clientjs
Gathering detailed insights and metrics for clientjs
Gathering detailed insights and metrics for clientjs
Gathering detailed insights and metrics for clientjs
@types/clientjs
TypeScript definitions for clientjs
timemanager-clientjs
Epitech's first project : TimeManager JS Client to request backend third party API
dineup-clientjs
This library embeds a configurable DineUp order widget into a web page
sponge-clientjs
A simple package that allows you to to run javascript on the client side from the backend in express.
Device information and digital fingerprinting written in pure JavaScript.
npm install clientjs
Typescript
Module System
Node Version
NPM Version
JavaScript (99.6%)
Shell (0.4%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
2,188 Stars
236 Commits
341 Forks
50 Watchers
17 Branches
9 Contributors
Updated on Jul 15, 2025
Latest Version
0.2.1
Package Id
clientjs@0.2.1
Unpacked Size
0.96 MB
Size
313.94 kB
File Count
24
NPM Version
6.14.13
Node Version
14.18.1
Published on
Oct 25, 2021
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
23
Device information and digital fingerprinting written in pure JavaScript.
ClientJS is a JavaScript library that makes digital fingerprinting easy, while also exposing all the browser data-points used in generating fingerprints.
If you want to fingerprint browsers, you are probably also interested in other client-based information, such as screen resolution, operating system, browser type, device type, and much more.
Below are some features that make ClientJS different from other fingerprinting libraries:
To use ClientJS, simply include dist/client.base.min.js
or one of the other bundles (see bundles section for more details)
1npm install clientjs
Digital fingerprints are based on device/browser settings. They allow you to make an "educated guess" about the identify of a new or returning visitor. By taking multiple data points, combining them, and representing them as a number, you can be surprisingly accurate at recognizing not only browsers and devices, but also individual users.
This is useful for identifying users or devices without cookies or sessions. It is not a full proof technique, but it has been shown to be statistically significant at accurately identifying devices.
First, you'll need to import the library. You can do it in different ways, depending on your environment:
1// in an ES6 environment: 2import { ClientJS } from 'clientjs'; 3 4// via CommonJS imports: 5const { ClientJS } = require('clientjs'); 6 7// in a browser, when using a script tag: 8const ClientJS = window.ClientJS;
After having imported the library, simply create a new ClientJS
object and call the getFingerprint()
method which will return
the browser/device fingerprint as a 32bit integer hash ID.
1// Create a new ClientJS object 2const client = new ClientJS(); 3 4// Get the client's fingerprint id 5const fingerprint = client.getFingerprint(); 6 7// Print the 32bit hash id to the console 8console.log(fingerprint);
The current data-points that used to generate fingerprint 32bit integer hash ID is listed below:
For maximum flexibility, this library is distributed in 4 different pre-bundled variants for the browser:
dist/client.min.js
- full distribution bundle, contains Flash and Java detection mechanismsdist/client.flash.min.js
- contains Flash detection mechanism but misses Java detection (getJavaVersion()
will throw an error when called)dist/client.java.min.js
- contains Java detection mechanism but misses Flash detection (getFlashVersion()
will throw an error when called)dist/client.base.min.js
- misses both, Flash and Java detection mechanisms (getFlashVersion()
and getJavaVersion()
will throw an error when called)Below is the current list of available methods to find information on a users browser/device.
You can find documentation on each method at clientjs.org.
1const client = new ClientJS(); 2 3client.getBrowserData(); 4client.getFingerprint(); 5client.getCustomFingerprint(...); 6 7client.getUserAgent(); 8client.getUserAgentLowerCase(); 9 10client.getBrowser(); 11client.getBrowserVersion(); 12client.getBrowserMajorVersion(); 13client.isIE(); 14client.isChrome(); 15client.isFirefox(); 16client.isSafari(); 17client.isOpera(); 18 19client.getEngine(); 20client.getEngineVersion(); 21 22client.getOS(); 23client.getOSVersion(); 24client.isWindows(); 25client.isMac(); 26client.isLinux(); 27client.isUbuntu(); 28client.isSolaris(); 29 30client.getDevice(); 31client.getDeviceType(); 32client.getDeviceVendor(); 33 34client.getCPU(); 35 36client.isMobile(); 37client.isMobileMajor(); 38client.isMobileAndroid(); 39client.isMobileOpera(); 40client.isMobileWindows(); 41client.isMobileBlackBerry(); 42 43client.isMobileIOS(); 44client.isIphone(); 45client.isIpad(); 46client.isIpod(); 47 48client.getScreenPrint(); 49client.getColorDepth(); 50client.getCurrentResolution(); 51client.getAvailableResolution(); 52client.getDeviceXDPI(); 53client.getDeviceYDPI(); 54 55client.getPlugins(); 56client.isJava(); 57client.getJavaVersion(); // functional only in java and full builds, throws an error otherwise 58client.isFlash(); 59client.getFlashVersion(); // functional only in flash and full builds, throws an error otherwise 60client.isSilverlight(); 61client.getSilverlightVersion(); 62 63client.getMimeTypes(); 64client.isMimeTypes(); 65 66client.isFont(); 67client.getFonts(); 68 69client.isLocalStorage(); 70client.isSessionStorage(); 71client.isCookie(); 72 73client.getTimeZone(); 74 75client.getLanguage(); 76client.getSystemLanguage(); 77 78client.isCanvas(); 79client.getCanvasPrint();
It is important to note this project owes much to other pieces great works. We had the advantage of observing how others had approached this problem.
Built Upon:
Collaborate by forking this project and sending a Pull Request this way.
Once cloned, install all dependencies. ClientJS uses Karma as its testing environment.
1# Install dependencies 2$ npm install
Run Karma and enjoy coding!
1$ npm test
Thanks for contributing to ClientJS! Please report any bug here.
To make a new release, use the release-it
tool, this will guide you through the release process:
1npx release-it
You can make a dry run of the release process with the following command:
1npx release-it --dry-run
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/17 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
78 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More