複数のJSファイルを1コネクションで読み込むんだってさ
複数のJavaScriptファイルを1コネクションでスッキリ一括読み込みする方法
Supercharged Javascript
気が付くとJSライブラリがいっぱいになってる事が多いので、これは便利かも。。。
読み込み速度が目に見えて速くなるとは思わないが、複数コネクションを1コネクションにできるのだから、サーバにやさしくなる場合もあるだろう。
人気サイトであればあるほど効果大?
1ページ辺りのコネクション数を減らすってのは、チープ実装の一環になる可能性もある。今まで考えてすらいなかった。。。
これからは気をつけます。
んで、実装するにあったって"scripts"の中で一箇所だけ修正。(PHP4.1.0以降への対応修正)
あとは、Blogの記事通りやった。
--
CSSもやってみようかな。
Supercharged Javascript
気が付くとJSライブラリがいっぱいになってる事が多いので、これは便利かも。。。
読み込み速度が目に見えて速くなるとは思わないが、複数コネクションを1コネクションにできるのだから、サーバにやさしくなる場合もあるだろう。
人気サイトであればあるほど効果大?
1ページ辺りのコネクション数を減らすってのは、チープ実装の一環になる可能性もある。今まで考えてすらいなかった。。。
これからは気をつけます。
んで、実装するにあったって"scripts"の中で一箇所だけ修正。(PHP4.1.0以降への対応修正)
// Here we're going to extract the filename list.
// We just split the original URL with "/" as the pivot
$expl = explode("/",$HTTP_SERVER_VARS["REQUEST_URI"]);
// Do a little trimming and url decoding to change %20 into spaces.
$fileList = trim(urldecode($expl[count($expl)-1]));
// And explode the remainder out with "," as the pivot to get our list.
$fileNames = explode(",",$fileList);
18行目の $HTTP_SERVER_VARS["REQUEST_URI"] を
// Here we're going to extract the filename list.
// We just split the original URL with "/" as the pivot
$expl = explode("/",$_SERVER["REQUEST_URI"]);
// Do a little trimming and url decoding to change %20 into spaces.
$fileList = trim(urldecode($expl[count($expl)-1]));
// And explode the remainder out with "," as the pivot to get our list.
$fileNames = explode(",",$fileList);
$_SERVER["REQUEST_URI"] に書き換え。あとは、Blogの記事通りやった。
--
CSSもやってみようかな。
About this entry
Archive type
Individual archive
Published
2007/02/06 18:17
0 Comments