I want to check browser mode by using Javascript. I found this link, but it doesn't work for new version of Chrome. Is there any new way to check this?
Asked
Active
Viewed 2,112 times
3
-
This is solved on Joe's work. Have a look! – Es Noguera Jan 19 '22 at 15:18
1 Answers
3
This is an old question, but to answer it: yes, you can still detect incognito in Chromium-based browsers. The gist is you call navigator.storage.estimate() and compare the quota property to performance.memory.jsHeapSizeLimit. If the quota is less than jsHeapSizeLimit, it's incognito.
I have a script that you can take a look at.

Joe Rutkowski
- 171
- 1
- 3
- 6
-
Hello Joe, I just checked your code and works very well on the latest chrome version where I am currently working on. Thank you for your work it is very complete. – Es Noguera Jan 19 '22 at 15:16