Kit, Seems like you answered your own question there.
The only added benefit of putting the script in the header of every page, is that for the first time the script is downloaded, every subsequent page load will not require the same download again, even your Javascript reliant page. If you are talking about only half of your site visitors viewing this Javascript page FIRST, It seems foolish to make the other half suffer. Also, this other half will be bogging down your server for the said script files. I would seriously suggest you consider the usual methods of improving performance. Consider looking at YSLOW, a popular extension to Firebug that Yahoo have developed that outlines some of these methods. Yahoo cares about every byte that goes out of their servers. One thing that I would really recommend straight off the bat is obtaining a "minified" version of Prototype and Scriptaculous (Protoculous I think its called). This will reduce the number of requests to some rather large files. Also, if you are only including the effects.js aspects of Scriptaculous, do not include scriptaculous.js by itself. Finally, make sure your server can Gzip on the wire as this will reduce your bandwidth usage and reduce page load times substantially (but may hammer your webserver a bit). Karl On 10/9/07, Kit Grose <[EMAIL PROTECTED]> wrote: > G'day all, > > I've had some internal debate about this topic, so I thought I'd put > it to the list: > > Imagine a large (300 dynamic pages+) site with a real client focus on > speed. An average user is expected to visit around 5% of the site per > visit (~15 pages), and the user is expected to visit with an unprimed > cache around 75% of the time. > > One very popular page of the site expects to get hits from more than > half of all visitors, and uses all kinds of (unobtrusive) Javascript > goodies, requiring Script.aculo.us (and therefore Prototype). The > page is the only page on the entire site that uses either library. > > The server is quite slow, so HTTP requests are at a premium. > > So the question I ask is this: do you > 1. load the libraries as part of the global header on every page so > that visitors to the swishy page aren't waiting an exorbitant time to > view all the Javascript goodies while waiting for two entire JS > libraries (and the actual behaviour for the page) to download, but > extending the initial load time of the site, or > 2. load the libraries on the page in question only, slowing the intra- > site navigation, but not penalising users who never intend to visit > that particular page of the site. > > In essence, is it more important to optimise the initial load time, > or load-time per subsequent page? > > > Cheers, > > Kit Grose > Frontend Developer > iQmultimedia > [EMAIL PROTECTED] > > ******************************************************************* > List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm > Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm > Help: [EMAIL PROTECTED] > ******************************************************************* > ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *******************************************************************