0

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.

samwyse
  • 2,760
  • 1
  • 27
  • 38
  • 4
    That's one of the ideas about incognito browsing... you are not able to distinguish it. – Christoph Apr 19 '14 at 13:10
  • 1
    Why? The whole point of incognito is that it doesn't appear as anything other than a normal request to the server. Just to be clear, incognito mode/private browsing does not _prevent_ cookies, it just deletes them after the session and does not store local history. – Burhan Khalid Apr 19 '14 at 13:11
  • To use the canonical example, I would like to display a list of, say, Internet news sites when browsing normally and a list of florists and jewelers when browsing privately. – samwyse Apr 19 '14 at 14:42

1 Answers1

2

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:

Community
  • 1
  • 1
ack__
  • 913
  • 1
  • 14
  • 39