0

Is it possible to determine if Google Chrome is in incognito mode via a script?

I've tried this code also but doesn't work for me.

var fs = window.RequestFileSystem || window.webkitRequestFileSystem;
    if (!fs) {
      console.log("check failed?");
    } else {
      fs(window.TEMPORARY,
         100,
         console.log.bind(console, "not in incognito mode"),
         console.log.bind(console, "incognito mode"));
    }

Can we get the browser incognito checker in angular or using javascript?

  • 2
    Duplicate [Can you determine if Chrome is in incognito mode via a script?](https://stackoverflow.com/questions/2909367/can-you-determine-if-chrome-is-in-incognito-mode-via-a-script) – esqew Aug 08 '23 at 11:54
  • 2
    Just a reminder that these kind of questions normally make more sense when they include a specific use case. The request alone is a privacy concern and I'm sure that Google is patching solutions as they come. And of course Chrome is not yet the only browser that exists. – Álvaro González Aug 08 '23 at 12:01
  • 1
    [Protecting private browsing in Chrome](https://www.blog.google/outreach-initiatives/google-news-initiative/protecting-private-browsing-chrome/) – Ivar Aug 08 '23 at 12:07

0 Answers0