Googling this question turns up questions about people wanting to know if someone else in their household is using incognito mode when they browse the web, that is not what I'm interested in. Using cookies, I cannot distinguish between a first time visitor and an incognito or private mode visitor. I would like to distinguish between those two cases.

有帮助吗?

解决方案

It is sometimes possible to detect private-mode in client browsers, though the methods used are not 100% reliable depending on the browser version and release.

Most of the methods used for this are based on Javascript code, and some other make use of HTML5 or CSS features (e.g. LocalStorage on Safari).

See the following answers for more details:

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top