> 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? John C. _______________________________________________ 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