[英]Is there any way to check browser works with incognito mode or not by using javascript?
This is an old question, but to answer it: yes, you can still detect incognito in Chromium-based browsers.这是一个老问题,但要回答它:是的,您仍然可以在基于 Chromium 的浏览器中检测隐身。 The gist is you call navigator.storage.estimate() and compare the quota property to performance.memory.jsHeapSizeLimit.要点是您调用 navigator.storage.estimate() 并将配额属性与 performance.memory.jsHeapSizeLimit 进行比较。 If the quota is less than jsHeapSizeLimit, it's incognito.如果配额小于 jsHeapSizeLimit,则为隐身。
I have a script that you can take a look at.我有一个脚本,你可以看看。
https://github.com/Joe12387/detectIncognito https://github.com/Joe12387/detectIncognito
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.