When building a standard (non-WordPress) web page, I generally load all javascript files just before the end of the body, and then include a section for page-specific js code.
WorPress recommends using the wp_enqueue_script() function for loading javascript, which allows for the option of loading scripts in either the header or footer.
Since WordPress headers and footers are encapsulated in their own files, where would one put code specific to a page-template? It seems if you are using any non-site-wide scripts, you’re forced to load your site-wide scripts in the header, and then insert the page-specific code somewhere else arbitrarily in the body, before the footer.
Anyone have any thoughts on this? Am I thinking about this too much?
You can try Conditional Tags in header and load page template specific scripts.