1

Is it possible to detect private browsing mode on Internet Explorer using Forge Trigger.IO's framework from an extension?

EDIT

I am looking for something similar to Firefox's nsIPrivateBrowsingService or to Chrome's chrome.tabs API's incognito check.

josesigna
  • 488
  • 3
  • 16

3 Answers3

1

Couldn't you just attempt to place a cookie (or write to local storage)? If the cookie (and data) does not exist... then private mode is on?

Kris Krause
  • 7,304
  • 2
  • 23
  • 26
  • I see your point but there are many ways of 'guessing' that private mode might be on. I am looking for a definite way of doing so on Internet Explorer. I edited my question to add examples of what I am looking for; currently available for other browsers. – josesigna Oct 10 '12 at 19:18
1

Internet Explorer disables all browser extensions when entering private browsing mode which means that:

  1. Your extension never runs on tabs in private browsing mode.
  2. Instances of your extension running in other tabs are neither aware of nor can they interact with pages in private browsing mode.

The unfortunate result of this decision by Microsoft is that even if you had a method of detecting incognito status on a window [1] you wouldn't be able to do anything with that information!

[1] e.g. Writing a BHO that enumerates all desktop windows and checks for the string "InPrivate" in their titles.

  • But extensions can be enabled in private mode. They are disabled by default but if enabled, they would run as usual in private mode. – josesigna Oct 23 '12 at 15:46
0

Conclusion

  • Extensions indeed can run on inPrivate Mode if the option (OFF by default) to enable extensions inPrivate Mode is ON.

  • There is no way of getting this information using Trigger.IO's framework at this moment.

josesigna
  • 488
  • 3
  • 16