Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / docs / templates / articles / hosting.html
blob9726c8264b0f18c3f7428d33ecc9990e05b92ff5
1 <h1>Hosting</h1>
3 <p class="warning"><b>Warning:</b>
4 As of Chrome 33,
5 Windows users can only download extensions
6 hosted in the Chrome Web store,
7 except for installs via
8 <a href="https://support.google.com/chrome/a/answer/188453">enterprise policy</a>
9 or
10 <a href="getstarted#unpacked">developer mode</a>
11 (see
12 <a href="http://blog.chromium.org/2013/11/protecting-windows-users-from-malicious.html">Protecting Windows users from malicious extensions</a>).
13 As of Chrome 44, no external installs are allowed from a path to a local .crx on Mac
14 (see
15 <a href="http://blog.chromium.org/2015/05/continuing-to-protect-chrome-users-from.html">Continuing to protect Chrome users from malicious extensions</a>).
16 </p>
18 <p>
19 This page tells you how to host <code>.crx</code> files
20 on your own server.
21 If you distribute your extension, app, or theme solely through the
22 <a href="http://chrome.google.com/webstore">Chrome Web Store</a>,
23 you don't need this page.
24 Instead, consult the
25 <a href="https://support.google.com/chrome_webstore/">store help</a> and
26 <a href="http://code.google.com/chrome/webstore/index">developer documentation</a>.
27 </p>
29 <p>
30 By convention, extensions,
31 installable web apps, and themes are served&mdash;whether
32 by the Chrome Web Store or by a custom server&mdash;as
33 <code>.crx</code> files.
34 When you upload a ZIP file with the
35 <a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Developer Dashboard</a>,
36 the dashboard creates the <code>.crx</code> file for you.
37 </p>
39 <p>
40 If you aren't publishing using the dashboard,
41 you need to create the <code>.crx</code> file yourself,
42 as described in <a href="packaging">Packaging</a>.
43 You can also specify
44 <a href="autoupdate">autoupdate</a> information to ensure that
45 your users will have the latest copy of the <code>.crx</code> file.
46 </p>
48 <p>
49 A server that hosts <code>.crx</code> files
50 must use appropriate HTTP headers,
51 so that users can install the file
52 by clicking a link to it.
53 </p>
55 <p>
56 Google Chrome considers a file to be installable
57 if <b>either</b> of the following is true:
58 </p>
60 <ul>
61 <li>
62 The file has the content type
63 <code>application/x-chrome-extension</code>
64 </li>
65 <li>
66 The file suffix is <code>.crx</code>
67 and <b>both</b> of the following are true:
68 <ul>
69 <li>
70 The file <b>is not</b> served with
71 the HTTP header <code>X-Content-Type-Options: nosniff</code>
72 </li>
73 <li>
74 The file <b>is</b> served
75 with one of the following content types:
76 <ul>
77 <li> empty string </li>
78 <li> "text/plain" </li>
79 <li> "application/octet-stream" </li>
80 <li> "unknown/unknown" </li>
81 <li> "application/unknown" </li>
82 <li> "*/*" </li>
83 </ul>
84 </li>
85 </ul>
86 </li>
87 </ul>
89 <p>
90 The most common reason for failing to recognize an installable file
91 is that the server sends the header
92 <code>X-Content-Type-Options: nosniff</code>.
93 The second most common reason
94 is that the server sends an unknown content type&mdash;one
95 that isn't in the previous list.
96 To fix an HTTP header issue,
97 either change the configuration of the server
98 or try hosting the <code>.crx</code> file at another server.
99 </p>