1

Is it still possible to detect incognito mode in Chrome from version 83 by javascript? It seems to me that from version 83 detecting by temporary storage quota <= 120 mb (method below):

if ('storage' in navigator && 'estimate' in navigator.storage) {
    const {usage, quota} = await navigator.storage.estimate();
    console.log(`Using ${usage} out of ${quota} bytes.`);

    if(quota < 120000000){
        console.log('Incognito')
    } else {
        console.log('Not Incognito')
    }   
} else {
    console.log('Can not detect')
}

for incognito has stopped working...

cobretti3030
  • 11
  • 1
  • 2
  • I'm on version 84.0.4147.89 and this [answer](https://stackoverflow.com/a/27805491/11575008) works. – yi fan song Jul 28 '20 at 12:04
  • Please check https://stackoverflow.com/questions/2909367/can-you-determine-if-chrome-is-in-incognito-mode-via-a-script – Asutosh Jul 28 '20 at 12:04
  • Chrome is actively trying to prevent the detection of Incognito. So even if you find a way, it's a matter of time before it gets fixed. – Ivar Jul 28 '20 at 12:08
  • Does this answer your question? [Can you determine if Chrome is in incognito mode via a script?](https://stackoverflow.com/questions/2909367/can-you-determine-if-chrome-is-in-incognito-mode-via-a-script) – Ivar Jul 28 '20 at 12:13

0 Answers0