Skip to content

neoprint.detectIncognito() ​

Detect private / incognito browsing mode.

Signature ​

ts
function detectIncognito(): Promise<{
  isIncognito: boolean
  signals: string[]
}>

Returns ​

  • isIncognito — true if any strong signal detected
  • signals — which heuristics triggered

Detection by Browser ​

BrowserMethodSignal
ChromeStorage quota drops from ~10GB to ~4GBlow_storage_quota
Chromenavigator.languages trimmed to 1 entrylanguages_trimmed
SafariStorage quota drops from ~82GB to ~1GBlow_storage_quota
SafariOPFS (getDirectory) throws erroropfs_blocked
SafarispeechSynthesis.getVoices() returns 0 voicesno_speech_voices
Firefoxnavigator.serviceWorker is undefinedfirefox_no_serviceworker

Example ​

ts
const result = await neoprint.detectIncognito()

if (result.isIncognito) {
  console.log('Private browsing:', result.signals)
}

Limitations ​

Safari has been the most aggressive at patching detection methods. The current approach is based on real-world measurements (2026) and may need recalibration as browsers evolve. Chrome on localhost reports lower quota than on real domains.

Released under the MIT License.