- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / docs / templates / articles / hosting.html
1 <h1>Hosting</h1>
2
3 <p>
4 This page tells you how to host <code>.crx</code> files
5 on your own server.
6 If you distribute your extension, app, or theme solely through the
7 <a href="http://chrome.google.com/webstore">Chrome Web Store</a>,
8 you don't need this page.
9 Instead, consult the
10 <a href="http://www.google.com/support/chrome_webstore/">store help</a> and
11 <a href="http://code.google.com/chrome/webstore/index.html">developer documentation</a>.
12 </p>
13
14 <p>
15 By convention, extensions,
16 installable web apps, and themes are served&mdash;whether
17 by the Chrome Web Store or by a custom server&mdash;as
18 <code>.crx</code> files.
19 When you upload a ZIP file with the
20 <a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Developer Dashboard</a>,
21 the dashboard creates the <code>.crx</code> file for you.
22 </p>
23
24 <p>
25 If you aren't publishing using the dashboard,
26 you need to create the <code>.crx</code> file yourself,
27 as described in <a href="packaging.html">Packaging</a>.
28 You can also specify
29 <a href="autoupdate.html">autoupdate</a> information to ensure that
30 your users will have the latest copy of the <code>.crx</code> file.
31 </p>
32
33 <p>
34 A server that hosts <code>.crx</code> files
35 must use appropriate HTTP headers,
36 so that users can install the file
37 by clicking a link to it.
38 </p>
39
40 <p>
41 Google Chrome considers a file to be installable
42 if <b>either</b> of the following is true:
43 </p>
44
45 <ul>
46   <li>
47     The file has the content type
48     <code>application/x-chrome-extension</code>
49   </li>
50   <li>
51     The file suffix is <code>.crx</code>
52     and <b>both</b> of the following are true:
53     <ul>
54       <li>
55         The file <b>is not</b> served with
56         the HTTP header <code>X-Content-Type-Options: nosniff</code>
57       </li>
58       <li>
59         The file <b>is</b> served
60         with one of the following content types:
61         <ul>
62           <li> empty string </li>
63           <li> "text/plain" </li>
64           <li> "application/octet-stream" </li>
65           <li> "unknown/unknown" </li>
66           <li> "application/unknown" </li>
67           <li> "*/*" </li>
68         </ul>
69       </li>
70     </ul>
71   </li>
72 </ul>
73
74 <p>
75 The most common reason for failing to recognize an installable file
76 is that the server sends the header
77 <code>X-Content-Type-Options: nosniff</code>.
78 The second most common reason
79 is that the server sends an unknown content type&mdash;one
80 that isn't in the previous list.
81 To fix an HTTP header issue,
82 either change the configuration of the server
83 or try hosting the <code>.crx</code> file at another server.
84 </p>