There is no dedicated feature in js to detect private mode: private mode detection is done using a collection of innovative hacks and misuses of features.
Tracking/detecting/fingerprinting/etc. is an arms race. Every feature a browser has (or could have and lacks), can be used as a variable to compile a tracking profile that identifies you and/or your general browser configuration (including but not limited to private mode).
The biggest one of these though is something private mode can't control: IP. For that you need something like Tor or a VPN.
- they decide that X shouldn't be allowed in incognito (or that incognito mode returns fewer values, has lower quotas, uses different implementation that is slower/faster etc.)
- inadvertently, this becomes incognito detection vector
- people report the issue; the feature X is fixed
- another thing is shipped which accidentally allows
detecting incognito
> Tracking/detecting/fingerprinting/etc. is an arms race. Every feature a browser has (or could have and lacks), can be used as a variable to compile a tracking profile that identifies you and/or your general browser configuration (including but not limited to private mode).
Which is exactly why Firefox needs to push back on adding more and more of those features, especially those that are not needed for websites (rather than applications).
Tracking/detecting/fingerprinting/etc. is an arms race. Every feature a browser has (or could have and lacks), can be used as a variable to compile a tracking profile that identifies you and/or your general browser configuration (including but not limited to private mode).
The biggest one of these though is something private mode can't control: IP. For that you need something like Tor or a VPN.