On 2/6/08, John Campbell <[EMAIL PROTECTED]> wrote: > > How about src-ing a .js? I've been looking at random pages and I'm > > surprised to see that not many pages actually do this. Is there a > > reason? > > For non-library code, it is faster to include the javascript with the > html because it saves a web request. For library code, it is a > trade-off... an extra web request vs loading the js from the cache > during subsequent page views. > > I also think creating a js file for each page is painful. When you > change the html you generally have to change the javascript, so why > not keep it in one place?
I was not going to have a .js for each page. I think one .js will do. And I don't see how this is any different from another cached .gif or .css. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php