Home | History | Annotate | Download | only in static
      1 <div id="pageData-name" class="pageData">Hosting</div>
      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 store help and
     10 <a href="http://code.google.com/chrome/webstore/index.html">developer documentation</a>.
     11 <!-- PENDING: add a link to the help -->
     12 </p>
     13 
     14 <p class="note">
     15 <strong>Note:</strong>
     16 If you've already published extensions to the 
     17 <a href="https://chrome.google.com/extensions">Extensions Gallery</a>,
     18 they will be merged into the store.
     19 </p>
     20 
     21 <p>
     22 By convention, extensions,
     23 installable web apps, and themes are served&mdash;whether
     24 by the Chrome Web Store or by a custom server&mdash;as
     25 <code>.crx</code> files.
     26 When you upload a ZIP file with the
     27 <a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Developer Dashboard</a>,
     28 the dashboard creates the <code>.crx</code> file for you.
     29 </p>
     30 
     31 <p>
     32 If you aren't publishing using the dashboard,
     33 you need to create the <code>.crx</code> file yourself,
     34 as described in <a href="packaging.html">Packaging</a>.
     35 You can also specify
     36 <a href="autoupdate.html">autoupdate</a> information to ensure that
     37 your users will have the latest copy of the <code>.crx</code> file.
     38 </p>
     39 
     40 <p>
     41 A server that hosts <code>.crx</code> files
     42 must use appropriate HTTP headers,
     43 so that users can install the file
     44 by clicking a link to it.
     45 </p>
     46 
     47 <p>
     48 Google Chrome considers a file to be installable
     49 if <b>either</b> of the following is true:
     50 </p>
     51 
     52 <ul>
     53   <li>
     54     The file has the content type
     55     <code>application/x-chrome-extension</code>
     56   </li>
     57   <li>
     58     The file suffix is <code>.crx</code>
     59     and <b>both</b> of the following are true:
     60     <ul>
     61       <li>
     62         The file <b>is not</b> served with
     63         the HTTP header <code>X-Content-Type-Options: nosniff</code>
     64       </li>
     65       <li>
     66         The file <b>is</b> served
     67         with one of the following content types:
     68         <ul>
     69           <li> empty string </li>
     70           <li> "text/plain" </li>
     71           <li> "application/octet-stream" </li>
     72           <li> "unknown/unknown" </li>
     73           <li> "application/unknown" </li>
     74           <li> "*/*" </li>
     75         </ul>
     76       </li>
     77     </ul>
     78   </li>
     79 </ul>
     80 
     81 <p>
     82 The most common reason for failing to recognize an installable file
     83 is that the server sends the header
     84 <code>X-Content-Type-Options: no sniff</code>.
     85 The second most common reason
     86 is that the server sends an unknown content type&mdash;one
     87 that isn't in the previous list.
     88 To fix an HTTP header issue,
     89 either change the configuration of the server
     90 or try hosting the <code>.crx</code> file at another server.
     91 </p>
     92