Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / docs / templates / articles / manifest / incognito.html
1 <h1 id="incognito">Manifest - Incognito</h1>
2
3 <p>
4 Use the <code>"incognito"</code> manifest key with either
5 <code>"spanning"</code> or <code>"split"</code> to specify how this
6 {{platform}} will behave if allowed to run in incognito mode.
7 </p>
8
9 <p>
10 Only extensions can choose. Apps will always use the default value for the app
11 type; <code>"spanning"</code> for Chrome apps and <code>"split"</code> for
12 installable web and legacy packaged apps.
13 </p>
14
15 <h2 id="spanning">Spanning mode</h2>
16 <p>
17 The default for extensions and Chrome apps is <code>"spanning"</code>, which
18 means that it will run in a single shared process. Any events or messages from
19 an incognito tab will be sent to the shared process, with an <em>incognito</em>
20 flag indicating where it came from. Because incognito tabs cannot use this
21 shared process, an extension using the <code>"spanning"</code> incognito mode
22 will not be able to load pages from its extension package into the main frame
23 of an incognito tab.
24 </p>
25
26 <h2 id="split">Split mode</h2>
27 <p>
28 The default for installable web apps and legacy packaged apps is
29 <code>"split"</code>, which means that all app pages in an incognito window
30 will run in their own incognito process.  If the app or extension contains a
31 background page, that will also run in the incognito process.  This incognito
32 process runs along side the regular process, but has a separate memory-only
33 cookie store. Each process sees events and messages only from its own context
34 (for example, the incognito process will see only incognito tab updates).  The
35 processes are unable to communicate with each other.
36 </p>
37
38 <h2 id="how-to-choose">How to choose</h2>
39 <p>
40 As a rule of thumb, if your extension or app needs to load a tab in an
41 incognito browser, use <em>split</em> incognito behavior. If your extension or
42 app needs to be logged into a remote server use <em>spanning</em> incognito
43 behavior.
44 </p>
45
46 <p>
47 <a href="/{{platform}}s/storage.html#property-sync">chrome.storage.sync</a> and
48 <a href="/{{platform}}s/storage.html#property-local">chrome.storage.local</a>
49 are <em>always</em> shared between regular and incognito processes. It is
50 recommended to use them for persisting your {{platform}}'s settings.
51 </p>