Commit c75106ce authored by CrystalFaith's avatar CrystalFaith Committed by Commit Bot

[Extension Doc] Hosting Update

Update Hosting Side nav contained updates related to hosting released in 2014.
This documentation outlines the updated standard and re-organizes the sidebar.

Bug: 
Change-Id: I0496ca0a4fb2c56fdfda8ba31dbf869851713ed1
Reviewed-on: https://chromium-review.googlesource.com/722062
Commit-Queue: Crystal Lambert <crystallambert@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524206}
parent 7a509764
<h1>Hosting</h1> <h1>Hosting and Updating</h1>
<p class="warning"><b>Warning:</b> <h2 id="hosting">Hosting</h2>
As of Chrome 33,
Windows users can only download extensions
hosted in the Chrome Web store,
except for installs via
<a href="https://support.google.com/chrome/a/answer/188453">enterprise policy</a>
or
<a href="getstarted#unpacked">developer mode</a>
(see
<a href="http://blog.chromium.org/2013/11/protecting-windows-users-from-malicious.html">Protecting Windows users from malicious extensions</a>).
As of Chrome 44, no external installs are allowed from a path to a local .crx on Mac
(see
<a href="http://blog.chromium.org/2015/05/continuing-to-protect-chrome-users-from.html">Continuing to protect Chrome users from malicious extensions</a>).
</p>
<p> <p>
This page tells you how to host <code>.crx</code> files Extensions must be uploaded through the
on your own server. <a href="https://chrome.google.com/webstore/developer/dashboard">
If you distribute your extension, app, or theme solely through the Developer Dashboard</a>
<a href="http://chrome.google.com/webstore">Chrome Web Store</a>, and are
you don't need this page. <a href="/webstore">distributed</a> in the
Instead, consult the <a href="/webstore">store developer documentation</a>. <a href="https://chrome.google.com/webstore/category/extensions">
Chrome Web Store</a> to
<a href="http://blog.chromium.org/2015/05/continuing-to-protect-chrome-users-from.html">
protect users from malicious extensions</a>.
Allow users to add an extension through the web store
from a designated website by enabling
<a href="/webstore/inline_installation">inline installation</a>.
</p> </p>
<p> <p>
By convention, extensions, There are three exceptions to the Chrome Web Store hosting rule:
installable web apps, and themes are served&mdash;whether <ol>
by the Chrome Web Store or by a custom server&mdash;as <li>Extensions that are distributed through the
<code>.crx</code> files. <a href="https://support.google.com/chrome/a/answer/188453">
When you upload a ZIP file with the enterprise policy</a>.</li>
<a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Developer Dashboard</a>, <li>Unpacked extension directories from a local machine while in
the dashboard creates the <code>.crx</code> file for you. <a href="getstarted#unpacked">developer mode</a>.</li>
<li><a href="/linux_hosting">Hosting for Linux</a> installations.</li>
</ol>
</p> </p>
<p> <p>
If you aren't publishing using the dashboard, <a href="/hosting_changes">Read more about the hosting policy</a>.
you need to create the <code>.crx</code> file yourself,
as described in <a href="packaging">Packaging</a>.
You can also specify
<a href="autoupdate">autoupdate</a> information to ensure that
your users will have the latest copy of the <code>.crx</code> file.
</p> </p>
<h2 id="updating">Updating</h2>
<p> <p>
A server that hosts <code>.crx</code> files Extensions are automatically updated without user intervention,
must use appropriate HTTP headers, just like the Chrome Browser.
so that users can install the file
by clicking a link to it.
</p> </p>
<p> <p>
Google Chrome considers a file to be installable To update an extension,
if <b>either</b> of the following is true: the version number will need to increase in the manifest:
</p> </p>
<ul> <pre data-filename="manifest.json">
<li> {
The file has the content type ...
<code>application/x-chrome-extension</code> <b>"version": "1.5",</b>
</li> ...
<li> }
The file suffix is <code>.crx</code> }</pre>
and <b>both</b> of the following are true: <pre data-filename="manifest.json">
<ul> {
<li> ...
The file <b>is not</b> served with <b>"version": "1.6",</b>
the HTTP header <code>X-Content-Type-Options: nosniff</code> ...
</li> }
<li> }
The file <b>is</b> served </pre>
with one of the following content types:
<ul>
<li> empty string </li>
<li> "text/plain" </li>
<li> "application/octet-stream" </li>
<li> "unknown/unknown" </li>
<li> "application/unknown" </li>
<li> "*/*" </li>
</ul>
</li>
</ul>
</li>
</ul>
<p> <p>
The most common reason for failing to recognize an installable file Re-<a href="/packaging">package</a> the updated extension and locate it in the
is that the server sends the header <a href="https://chrome.google.com/webstore/developer/dashboard">
<code>X-Content-Type-Options: nosniff</code>. Developer Dashboard</a>.
The second most common reason Select <strong>Edit</strong>, upload the new package,
is that the server sends an unknown content type&mdash;one and hit <strong>Publish</strong>.
that isn't in the previous list. The extension will automatically update for users
To fix an HTTP header issue, after the new version is published.
either change the configuration of the server
or try hosting the <code>.crx</code> file at another server.
</p> </p>
<h1>Hosting for Linux</h1>
<p>
Extensions hosted on a server outside of the
<a href="http://chrome.google.com/webstore">Chrome Web Store</a>
can only be installed by Linux users.
This page describes how to serve <code>.crx</code> files
from a personal server.
If distributing an extension or theme solely through the
<a href="http://chrome.google.com/webstore">Chrome Web Store</a>,
consult the <a href="/webstore">store developer documentation</a>.
</p>
<p>
Extensions and themes are served as <code>.crx</code> files.
When uploading through the
<a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Developer Dashboard</a>,
the dashboard creates the <code>.crx</code> file automatically.
If published on a personal server,
the <code>.crx</code> file will need to be created locally,
as described in <a href="packaging">Packaging</a>.
<a href="autoupdate">Autoupdate</a> information can be included
to ensure users always have the latest copy.
</p>
<p>
A server that hosts <code>.crx</code> files
must use appropriate HTTP headers,
so that users can install the file
by clicking a link to it.
</p>
<p>
Google Chrome considers a file to be installable
if <b>either</b> of the following is true:
</p>
<ul>
<li>
The file has the content type
<code>application/x-chrome-extension</code>
</li>
<li>
The file suffix is <code>.crx</code>
and <b>both</b> of the following are true:
<ul>
<li>
The file <b>is not</b> served with
the HTTP header <code>X-Content-Type-Options: nosniff</code>
</li>
<li>
The file <b>is</b> served
with one of the following content types:
<ul>
<li> empty string </li>
<li> "text/plain" </li>
<li> "application/octet-stream" </li>
<li> "unknown/unknown" </li>
<li> "application/unknown" </li>
<li> "*/*" </li>
</ul>
</li>
</ul>
</li>
</ul>
<p>
The most common reason for failing to recognize an installable file
is that the server sends the header
<code>X-Content-Type-Options: nosniff</code>.
The second most common reason
is that the server sends an unknown content type&mdash;one
that isn't in the previous list.
To fix an HTTP header issue,
either change the configuration of the server
or try hosting the <code>.crx</code> file at another server.
</p>
...@@ -534,10 +534,6 @@ ...@@ -534,10 +534,6 @@
"title": "Overview", "title": "Overview",
"href": "/extensions/overview" "href": "/extensions/overview"
}, },
{
"title": "Hosting Changes",
"href": "/extensions/hosting_changes"
},
{ {
"title": "Extension Quality Guidelines FAQ", "title": "Extension Quality Guidelines FAQ",
"href": "/extensions/single_purpose" "href": "/extensions/single_purpose"
...@@ -624,9 +620,13 @@ ...@@ -624,9 +620,13 @@
"href": "/extensions/hosting", "href": "/extensions/hosting",
"items": [ "items": [
{ {
"title": "Hosting", "title": "Hosting and Updating",
"href": "/extensions/hosting" "href": "/extensions/hosting"
}, },
{
"title": "Hosting Policy Changes",
"href": "/extensions/hosting_changes"
},
{ {
"title": "Packaging", "title": "Packaging",
"href": "/extensions/packaging" "href": "/extensions/packaging"
...@@ -635,10 +635,6 @@ ...@@ -635,10 +635,6 @@
"title": "One-Time Payments", "title": "One-Time Payments",
"href": "/webstore/one_time_payments" "href": "/webstore/one_time_payments"
}, },
{
"title": "Autoupdating",
"href": "/extensions/autoupdate"
},
{ {
"title": "Other Deployment Options", "title": "Other Deployment Options",
"href": "/extensions/external_extensions" "href": "/extensions/external_extensions"
......
{{+partials.standard_extensions_article article:articles.linux_hosting/}}
...@@ -12,5 +12,6 @@ ...@@ -12,5 +12,6 @@
"cloudMessagingV1": "https://developers.google.com/cloud-messaging/chrome/client", "cloudMessagingV1": "https://developers.google.com/cloud-messaging/chrome/client",
"pushMessaging": "https://developers.google.com/cloud-messaging/chrome/client", "pushMessaging": "https://developers.google.com/cloud-messaging/chrome/client",
"gcm_tos": "https://developers.google.com/terms/", "gcm_tos": "https://developers.google.com/terms/",
"gcm_server": "https://developers.google.com/cloud-messaging/server" "gcm_server": "https://developers.google.com/cloud-messaging/server",
"autoupdate": "hosting"
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment