Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect incognito mode from extension background

I have specified "incognito" as "split" in my manifest file.

http://developer.chrome.com/extensions/manifest.html#incognito

So if the app or extension contains a background page, that will also run in the incognito process. This incognito process runs along side the regular process, but has a separate memory-only cookie store.

So how can I detect whether the background page is running in incognito process.

like image 814
Jeevan Avatar asked Aug 13 '12 05:08

Jeevan


People also ask

Can you detect Incognito mode?

Websites see you as a new user and won't know who you are, as long as you don't sign in. If you're browsing in Chrome Incognito mode, you are, by default, not signed into any accounts or sites. Your school, Internet Service Provider, or any parental tracking software may be able to see your activity.

Does Incognito work with extensions?

Extensions are not allowed to be enforced by the administrators in Incognito, whereas users can individually enable extensions in Incognito mode.

Can Incognito Chrome be tracked?

Incognito mode doesn't prevent web tracking Incognito mode does not mean you're browsing anonymously. Personal information like your device's IP address and what you're doing on a website (especially while logged in) is visible to others around the web who might be tracking you online.


1 Answers

Found the solution.

You can check it using

chrome.extension.inIncognitoContext

http://developer.chrome.com/dev/extensions/extension.html#property-inIncognitoContext

like image 61
Jeevan Avatar answered Sep 22 '22 08:09

Jeevan