There are plenty of ways to speed up web site hosting, and one of those is to host with a fast site that has a content delivery network (CDN) distributed around the world.

Nearly a year ago, Google Drive provided this capability, as mentioned in this article, however, the article gave no instructions on how to do so.

I've since discovered the proper method, and would like to share this.

  1. Create a folder in Google Drive
  2. Right click on the newly created folder, and select Share..., Share... and click the Change... link beside the "Private - only you can access" to "Public on the Web".
  3. Upload any files you wanted to use for web site hosting to this folder.
  4. Click on the file that you wanted to use, and at the bottom of the screen, there is a Open button, see below.

  5. Click on the Open button, and you'll see the file, such as below:
  6. In your address bar, you see an URL, and after /file/d, you have the file ID, which identifies the file uniquely.
  7. Now, the URL of the file you want to share is: https://googledrive.com/host/fileID so for the above file, the URL is:
    https://googledrive.com/host/0B4tfk3ddncPibllEY1JPWmhjQ0k.
  8. If you have several files to share, you'll end up with a lot of URLs with file IDs, and you have no idea which URL refers to which file. Here's a trick I use, based on HTTP RFC 2616 section 3.2.2. Append a query path to it, and identify your file that way. For my case, the URL then becomes
    https://googledrive.com/host/0B4tfk3ddncPibllEY1JPWmhjQ0k?shCore.js.

If you'll like to see a few examples of this performance tip in action, just view the source of this article. You'll see a few references to googledrive.com/host/.