{"id":24401623,"url":"https://github.com/joe12387/detectincognito","last_synced_at":"2025-05-14T15:07:25.562Z","repository":{"id":38681195,"uuid":"393461852","full_name":"Joe12387/detectIncognito","owner":"Joe12387","description":"JavaScript detection of Incognito \u0026 other private browsing modes on Chrome, Edge, Safari, Brave, Firefox, Opera and MSIE.","archived":false,"fork":false,"pushed_at":"2025-05-11T00:07:57.000Z","size":309,"stargazers_count":421,"open_issues_count":4,"forks_count":50,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-05-11T01:17:29.211Z","etag":null,"topics":["browser","chrome","edge","firefox","incognito","incognito-browsing","incognito-mode","incognito-window","internet-explorer","javascript","private-browsing","safari"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Joe12387.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Joe12387"}},"created_at":"2021-08-06T18:07:08.000Z","updated_at":"2025-05-11T00:01:57.000Z","dependencies_parsed_at":"2024-03-11T17:25:55.951Z","dependency_job_id":"a97dfa6a-f67b-4a3f-b8d4-7a2c12a2f5e6","html_url":"https://github.com/Joe12387/detectIncognito","commit_stats":{"total_commits":151,"total_committers":12,"mean_commits":"12.583333333333334","dds":"0.29139072847682124","last_synced_commit":"4b5d3826012ac26213daf5c12d764fe398b5fe05"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joe12387%2FdetectIncognito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joe12387%2FdetectIncognito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joe12387%2FdetectIncognito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joe12387%2FdetectIncognito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Joe12387","download_url":"https://codeload.github.com/Joe12387/detectIncognito/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254169662,"owners_count":22026213,"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":["browser","chrome","edge","firefox","incognito","incognito-browsing","incognito-mode","incognito-window","internet-explorer","javascript","private-browsing","safari"],"created_at":"2025-01-20T00:32:37.464Z","updated_at":"2025-05-14T15:07:25.549Z","avatar_url":"https://github.com/Joe12387.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Joe12387"],"categories":[],"sub_categories":[],"readme":"Shameless plug: [Looking for a user tracking or bot detection solution?](https://overpoweredjs.com/)\n\n\u003cimg src=\"./detectIncognito.svg\"  width=\"150\"  /\u003e\n\n# detectIncognito.js\n\ndetectIncognito.js can be used to detect incognito mode \u0026 other private browsing modes on most modern browsers as of 2025.\n\n- Detects Incognito mode on Google Chrome\n- Detects Private Windows on Safari for macOS\n- Detects Private Tabs on Safari for iOS\n- Detects Private Windows in Firefox\n- Detects InPrivate Windows on Microsoft Edge\n- Detects InPrivate Windows on Microsoft Internet Explorer\n- Detects Private Windows in Brave (see notes)\n- Detects Private Windows in Opera\n\n## Demo\n\nhttps://detectincognito.com/\n\n## Usage\n\nGet script from CDN (may be blocked by adblockers, see notes)\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/Joe12387/detectIncognito@main/dist/es5/detectIncognito.min.js\"\u003e\u003c/script\u003e\n```\n\nOr install from NPM\n\n```bash\nnpm i detectincognitojs\n```\n\n```javascript\nimport { detectIncognito } from \"detectincognitojs\";\n```\n\nRun the detect function\n\n```javascript\ndetectIncognito().then((result) =\u003e {\n  console.log(result.browserName, result.isPrivate);\n});\n```\n\n## Supported Browsers\n\n| Browser         | Platform(s) |      Versions       | Notes                            |\n| --------------- | :---------- | :-----------------: | :------------------------------- |\n| Safari          | iOS         | 8 to 18.4           |                                  |\n| Safari          | macOS       | ≤ 18.4              |                                  |\n| Chrome/Chromium | All         | 50 to 137 Beta      | `predictable-reported-quota` flag currently breaks detection (see [Issue #49](https://github.com/Joe12387/detectIncognito/issues/49)) |\n| Edge            | All         | 15 to 18; 79 to 136 |                                  |\n| Firefox         | All         | 44 to 138           |                                  |\n| Brave           | All         | ≤ 1.76              | CDN is blocked if shields are up |\n| MSIE            | Windows     | 11                  | Promise polyfill required        |\n\nPlease note that although this script works on almost all modern browsers, detecting private modes in browsers is very much an arms race. As such, I cannot guarantee that this script will continue to work into the future. However, I will continue to actively maintain this script to support as many browsers as is possible.\n\nIf you are aware of any modern browsers this script does not work with, please let me know by creating an issue.\n\n## Notes\n\n- There will be a false positive in certain browser configurations, as well as in Chrome's Guest mode. ([Issue #21](https://github.com/Joe12387/detectIncognito/issues/21)).\n- This script does not detect Container Tabs on Firefox as they work differently compared to private mode.\n- An error will be thrown if the browser cannot be identified.\n- The script only works remotely on a web server using HTTPS. Running the script locally or with HTTP may produce a false result, or it may not run at all.\n- Brave and uBlock Origin currently block the script from loading from the CDN. Hosting the script elsewhere should bypass this.\n\n## Similar Projects\n\n- [OverpoweredJS](https://overpoweredjs.com/ \"OverpoweredJS\") - An overpowered browser fingerprinting \u0026 bot detection solution.\n\n## License\n\nCopyright (c) 2025 Joe Rutkowski\n\nReleased under [MIT License](https://opensource.org/license/mit-0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoe12387%2Fdetectincognito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoe12387%2Fdetectincognito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoe12387%2Fdetectincognito/lists"}