JSFiddle - React, Tailwind, and code Playground

JavaScript

var dbTest;
    try{    
        dbTest =  window.indexedDB.open('test');
        alert('Incognito NOT detected')
    } catch(e){
        alert('Incognito detected')
    }