Question

I need the extension to open a tab on a page that is in the extension directory (something like "chrome-extension://myExtensionID/subfolder/index.html"). In normal mode it works, but in incognito mode chrome shows "This webpage is not available".

How can I fix that? Is there something to write on the manifest file? Thanks :)

Was it helpful?

Solution

You need to add the "incognito":"split" option to the manifest file.

From the documentation:

incognito

Either "spanning" or "split", to specify how this extension will behave if allowed to run in incognito mode.

The default for extensions is "spanning", which means that the extension will run in a single shared process. Any events or messages from an incognito tab will be sent to the shared process, with an incognito flag indicating where it came from. Because incognito tabs cannot use this shared process, an extension using the "spanning" incognito mode will not be able to load pages from its extension package into the main frame of an incognito tab.

Carefully test your extension though. "Split" incognito mode is not used very often in Chrome extensions. Every time I need to use it, I discover yet another bug which stops me from using it, or spending countless hours on finding work-arounds. For example:

  • Chrome 27 and earlier will crash if split incognito mode is enabled, webRequest events are used and the extension is reloaded (e.g. after an update).
  • Design flaw: The declarativeWebRequest API can't be used in incognito mode with event pages (bug 258090).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top