2 ms·
Registration-walled and complains if you open it in private mode (how?)
by pjc50 6y ago
Registration-walled and complains if you open it in private mode (how?)
- ev1 6y agoUsually easiest to drop some localStorage/cookie on another subdomain or domain you control then check if it exists
- jffry 6y agoBy default in Firefox, indexedDB is disabled in private browsing mode (dom.indexedDB.privateBrowsing.enabled=false in about:flags), so you can detect it with something like var db = indexedDB.open("test"); db.onerror = () => console.log('private browsing'); db.onsuccess = () => console.log('not private browsing'); Based on Bugzilla, it seems like currently the backing mechanism for implementing indexedDB will write origin names to disk which is not something they want Private Browsing to do. See this older bug https://bugzilla.mozilla.org/show_bug.cgi?id=781982 https://bugzilla.mozilla.org/show_bug.cgi?id=781982 and this newer one https://bugzilla.mozilla.org/show_bug.cgi?id=1639542 https://bugzilla.mozilla.org/show_bug.cgi?id=1639542