質問

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.

役に立ちましたか?

解決 3

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.

他のヒント

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?

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top