{"id":13493947,"url":"https://github.com/jackspirou/clientjs","last_synced_at":"2025-05-14T08:07:17.863Z","repository":{"id":11569882,"uuid":"14057721","full_name":"jackspirou/clientjs","owner":"jackspirou","description":"Device information and digital fingerprinting written in pure JavaScript.","archived":false,"fork":false,"pushed_at":"2023-01-08T17:39:54.000Z","size":2943,"stargazers_count":2159,"open_issues_count":57,"forks_count":338,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-05-11T03:26:45.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://clientjs.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackspirou.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-02T00:45:31.000Z","updated_at":"2025-05-08T10:14:27.000Z","dependencies_parsed_at":"2023-01-13T16:34:07.964Z","dependency_job_id":null,"html_url":"https://github.com/jackspirou/clientjs","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackspirou%2Fclientjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackspirou%2Fclientjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackspirou%2Fclientjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackspirou%2Fclientjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackspirou","download_url":"https://codeload.github.com/jackspirou/clientjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101617,"owners_count":22014909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:01:20.226Z","updated_at":"2025-05-14T08:07:14.646Z","avatar_url":"https://github.com/jackspirou.png","language":"JavaScript","readme":"![ClientJS logo](logo.jpg)\n\n**Device information and digital fingerprinting written in _pure_ JavaScript.**\n\n[![Sauce Test Status](https://saucelabs.com/buildstatus/clientjs)](https://saucelabs.com/u/clientjs) [![Build Status](http://beta.drone.io/api/badges/jackspirou/clientjs/status.svg)](http://beta.drone.io/jackspirou/clientjs) [![Aircover Coverage](https://aircover.co/badges/jackspirou/clientjs/coverage.svg)](https://aircover.co/jackspirou/clientjs)\u003c!--[![Kanban board for ClientJS issues at https://huboard.com/jackspirou/clientjs](https://img.shields.io/badge/Hu-Board-7965cc.svg)](https://huboard.com/jackspirou/clientjs) [![Join the chat at https://gitter.im/jackspirou/clientjs](https://badges.gitter.im/jackspirou/clientjs.svg)](https://gitter.im/jackspirou/clientjs)--\u003e\n\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/clientjs.svg)](https://saucelabs.com/u/clientjs)\n\nClientJS is a JavaScript library that makes digital fingerprinting easy, while also exposing all the browser data-points used in generating fingerprints.\n\nIf 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.\n\nBelow are some features that make ClientJS different from other fingerprinting libraries:\n- It's pure native JavaScript\n- It's decently lightweight at ~55 KB (full bundle) or ~28 KB (minimal bundle)\n- All user data points are available by design, not just the 32bit integer fingerprint\n\n\u003c!-- ## Documentation and Demos\nYou can find more documentation and demos on each method at [clientjs.org](https://clientjs.org/). --\u003e\n\n## Installation\nTo use ClientJS, simply include `dist/client.base.min.js` or one of the other bundles (see [bundles](#bundles) section for more details)\n\n### npm\n\n```shell\nnpm install clientjs\n```\n\n## Fingerprinting\nDigital fingerprints are based on device/browser settings.\nThey allow you to make an \"educated guess\" about the identify of a new or returning visitor.\nBy 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.\n\nThis is useful for identifying users or devices without cookies or sessions.\nIt is not a full proof technique, but it has been shown to be statistically significant at accurately identifying devices.\n\nFirst, you'll need to import the library. You can do it in different ways, depending on your environment:\n\n```js\n// in an ES6 environment:\nimport { ClientJS } from 'clientjs';\n\n// via CommonJS imports:\nconst { ClientJS } = require('clientjs');\n\n// in a browser, when using a script tag:\nconst ClientJS = window.ClientJS;\n```\n\nAfter having imported the library, simply create a new `ClientJS` object and call the `getFingerprint()` method which will return\nthe browser/device fingerprint as a 32bit integer hash ID.\n\n```js\n// Create a new ClientJS object\nconst client = new ClientJS();\n\n// Get the client's fingerprint id\nconst fingerprint = client.getFingerprint();\n\n// Print the 32bit hash id to the console\nconsole.log(fingerprint);\n```\n\nThe current data-points that used to generate fingerprint 32bit integer hash ID is listed below:\n- user agent\n- screen print\n- color depth\n- current resolution\n- available resolution\n- device XDPI\n- device YDPI\n- plugin list\n- font list\n- local storage\n- session storage\n- timezone\n- language\n- system language\n- cookies\n- canvas print\n\n## Bundles\nFor maximum flexibility, this library is distributed in 4 different pre-bundled variants for the browser:\n\n- `dist/client.min.js` - full distribution bundle, contains Flash and Java detection mechanisms\n- `dist/client.flash.min.js` - contains Flash detection mechanism but misses Java detection (`getJavaVersion()` will throw an error when called)\n- `dist/client.java.min.js` - contains Java detection mechanism but misses Flash detection (`getFlashVersion()` will throw an error when called)\n- `dist/client.base.min.js` - misses both, Flash and Java detection mechanisms (`getFlashVersion()` and `getJavaVersion()` will throw an error when called)\n\n## Available Methods\nBelow is the current list of available methods to find information on a users browser/device.\n\nYou can find documentation on each method at [clientjs.org](https://clientjs.org/).\n\n```js\nconst client = new ClientJS();\n\nclient.getBrowserData();\nclient.getFingerprint();\nclient.getCustomFingerprint(...);\n\nclient.getUserAgent();\nclient.getUserAgentLowerCase();\n\nclient.getBrowser();\nclient.getBrowserVersion();\nclient.getBrowserMajorVersion();\nclient.isIE();\nclient.isChrome();\nclient.isFirefox();\nclient.isSafari();\nclient.isOpera();\n\nclient.getEngine();\nclient.getEngineVersion();\n\nclient.getOS();\nclient.getOSVersion();\nclient.isWindows();\nclient.isMac();\nclient.isLinux();\nclient.isUbuntu();\nclient.isSolaris();\n\nclient.getDevice();\nclient.getDeviceType();\nclient.getDeviceVendor();\n\nclient.getCPU();\n\nclient.isMobile();\nclient.isMobileMajor();\nclient.isMobileAndroid();\nclient.isMobileOpera();\nclient.isMobileWindows();\nclient.isMobileBlackBerry();\n\nclient.isMobileIOS();\nclient.isIphone();\nclient.isIpad();\nclient.isIpod();\n\nclient.getScreenPrint();\nclient.getColorDepth();\nclient.getCurrentResolution();\nclient.getAvailableResolution();\nclient.getDeviceXDPI();\nclient.getDeviceYDPI();\n\nclient.getPlugins();\nclient.isJava();\nclient.getJavaVersion(); // functional only in java and full builds, throws an error otherwise\nclient.isFlash();\nclient.getFlashVersion(); // functional only in flash and full builds, throws an error otherwise\nclient.isSilverlight();\nclient.getSilverlightVersion();\n\nclient.getMimeTypes();\nclient.isMimeTypes();\n\nclient.isFont();\nclient.getFonts();\n\nclient.isLocalStorage();\nclient.isSessionStorage();\nclient.isCookie();\n\nclient.getTimeZone();\n\nclient.getLanguage();\nclient.getSystemLanguage();\n\nclient.isCanvas();\nclient.getCanvasPrint();\n```\n\n## Shoulders of Giants\nIt is important to note this project owes much to other pieces great works.\nWe had the advantage of observing how others had approached this problem.\n\nBuilt Upon:\n- https://web.archive.org/web/20200714191004/https://github.com/Valve/fingerprintjs\n- https://web.archive.org/web/20200411083356/https://www.darkwavetech.com/index.php/device-fingerprint-blog\n- http://detectmobilebrowsers.com\n\n## Contributing\nCollaborate by [forking](https://help.github.com/articles/fork-a-repo/) this project and sending a Pull Request this way.\n\nOnce cloned, install all dependencies. ClientJS uses [Karma](https://karma-runner.github.io/) as its testing environment.\n\n```shell\n# Install dependencies\n$ npm install\n```\n\nRun Karma and enjoy coding!\n\n```shell\n$ npm test\n```\n\nThanks for contributing to ClientJS! Please report any bug [here](https://github.com/jackspirou/clientjs/issues).\n\n## Releasing\n\nTo make a new release, use the [`release-it`](https://github.com/release-it/release-it) tool, this will guide you through the release process:\n\n```sh\nnpx release-it\n```\n\nYou can make a dry run of the release process with the following command:\n\n```sh\nnpx release-it --dry-run\n```\n\n## LICENSE\n[Apache License 2.0](https://github.com/jackspirou/clientjs/blob/master/LICENSE)\n","funding_links":[],"categories":["JavaScript","Repository"],"sub_categories":["Finger Printing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackspirou%2Fclientjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackspirou%2Fclientjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackspirou%2Fclientjs/lists"}