Home > Net >  Making users use incognito mode in browsing instead of normal browsing
Making users use incognito mode in browsing instead of normal browsing

Time:10-24

I heard that Google removed the function of detecting incognito browsing so I'm asking for other ways to force my users to use incognito mode instead of normal browsing to avoid screenshot in React JS. Is there a way to require users to use incognito mode for browsing my web app?

CodePudding user response:

I'm not sure about the practicality of your use case, but yes, it is possible. I manage a script that detects private browsing windows in all browsers (as of October 2021).

https://github.com/Joe12387/detectIncognito

CodePudding user response:

It is currently possible to detect the usage of incognito mode in certain browser versions, e.g. by feature detection. The answer from Joe Rutkowski provides a solution with his detectIncognito script that (apparently) works right now, and he also states that he will try to keep it working in the future as far as possible.

But also notice that the ability to detect the usage of "incognito mode" and "private browsing" mode etc. is considered a "loop hole" or even "bug" by the browser vendors, and they work hard to fix this.

This is a battle between the browser vendors which try to provide privacy for their users and website authors which try to get as much information about their users as possible. So you will have to "fight back" and constantly find new loop holes when the current ones are closed (or rely on other people like Joe Rutkowski and probably others to do it for you, and update their tools reqularily).

E.g. see "Protecting private browsing in Chrome":

As of July 2020, Chrome is gradually rolling out a previously announced fix to address a loophole that could be used by websites to detect Chrome Incognito Mode sessions.

or Issue 990592: Chrome 76 can still detect incognito mode via FileSystem API:

Incognito mode should not be detectable in Chrome 76

  • Related