2009年3月27日金曜日

Google Codeの JavaScriptファイルを外部サイトから読み込んでも良い?

Google CodeでホスティングしているJavaScriptファイルやCSSファイルを、自分のサイトで読み込んでよいか?について調査。

Google自身によるIE7.jsやgmaps utility libraryなどのプロジェクトを見ると、Google CodeからJavaScriptを読み込んでも良いように書いてある。

Upgrade MSIE5-6 to be compatible with MSIE7.
<!--[if lt IE 7]>
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script>
<![endif]-->
What's the purpose of this project?
We've realized that there are many possibly useful extensions of the Google Maps API for adventurous developers, but that the common user needs a reliable and quick-loading API.
(中略)
I want to use a library here in my maps mashup. What do I link to in my script include?
If you want to use a stable release, you should link to the code in the release project here: http://gmaps-utility-library.googlecode.com/svn/trunk/
Links to the release versions of each library are listed on the Libraries page.


また、(たぶん)Googleに在籍しているDaniel O'Brienさん
Is it ok to host javascript directly from Google Code?

Yes, so long as it doesn't send an extreme amount of traffic our way,

at which point requests might start being throttled.

と回答している。

なので、ある程度大量のトラフィックじゃなければOKみたい。


でも、Google Code Prettifyのところを見ると、自分のサーバに置いて使わないといけないと書いてある。
Include the script and stylesheets in your document (you will need to make sure the css and js file are on your server, and adjust the paths in the script and link tag)
from Javascript code prettifier

うーん?

JavaScript Hostを使ったほうがいいのかなあ?

0 件のコメント:

ブログ アーカイブ

tags