How Extension Docs Are Served

Pages that have URLs beginning with http://code.google.com/chrome/extensions are served from files in the Chromium source repository. Four versions of the doc exist at all times—stable (default), beta, dev, and trunk—corresponding to the three Windows release channels of Google Chrome plus the tip-of-tree Chromium source code (which is closer to the Canary build).

The following figure shows how the extension doc server takes a request for a URL such as http://code.google.com/chrome/extensions/docs.html, gets the corresponding file from the Chromium source repository, and then delivers it to the browser.



By default, the doc server delivers files corresponding to the current Windows stable channel release. You can find the release branch by going to https://omahaproxy.appspot.com/viewer and looking at the tuple after "win stable". As I write this page, the tuple is 13.0.782.215, which means that the stable Windows branch (for Chrome 13) is 782. The upshot? The doc server currently gets the source for http://code.google.com/chrome/extensions/docs.html from http://src.chromium.org/viewvc/chrome/branches/782/src/chrome/common/extensions/docs/docs.html.

You can get different versions of the doc by adding "/beta", "/dev", or "/trunk" to the URL, after "/extensions". For example, specifying http://code.google.com/chrome/extensions/trunk/docs.html gives you the content of http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/docs.html.

Try this

Here's an easy way to see where doc files are served from.
  1. Go to a doc page using a URL without a version specifier—something like http://code.google.com/chrome/extensions/experimental.html.

  2. Modify the URL so that the filename is no longer valid. Example: http://code.google.com/chrome/extensions/x.html
    You should see a 404 page with a path that starts with "branches", something like this:

    branches/782/src/chrome/common/extensions/docs/x.html: unknown location

    That message indicates that the doc server couldn't find the file x.html in the Chromium repository directory branches/782/src/chrome/common/extensions/docs.

  3. Now go to the Dev channel version of the page from step 1 by inserting "/dev" after "/extensions". Example: http://code.google.com/chrome/extensions/dev/experimental.html
    The page might or might not look the same as the one in step 1, but it's being served from a different place.

  4. Again, modify the URL so that the filename is no longer valid. Example: http://code.google.com/chrome/extensions/dev/x.html
    You should see a 404 page with a different branch than before, something like this:

    branches/861/src/chrome/common/extensions/docs/x.html: unknown location

    That message tells you that the "dev" docs are in branch 861, which you could verify using https://omahaproxy.appspot.com/viewer.

  5. In steps 3 & 4, try changing "dev" to "trunk", then "beta", and then "stable". Those strings specify the tip-of-tree, Beta channel, and stable (default) docs, respectively. Note that the tip-of-tree docs are always served from the Chromium repository directory trunk/src/chrome/common/extensions/docs.
Comments