Michael B Allen wrote: > Is it considered bad practice to emit scripts within the body of a > page such as immediately preceeding the form that uses it? It seems to > work fine but from looking at some random sites I have yet to see an > example of this. Logically it makes sense to put the JavaScript close > to where it will be used no? >
That actually makes perfect sense in terms of download speed. It became somewhat of a standard practice to include JS in the HEAD of the document, but that actually slows things down. I actually wrote about this and a bunch of other JS optimization tricks in my well-ignored Wordpress blog (primarily ignored by me): http://insite-out.com/#load-scripts-last _______________________________________________ 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