to reference the script from within your page. This allows you to do away with the <!-- --> around the script that used to be used to hide it from browsers such as Internet Explorer 2 that don't understand the script tag (and which the xhtml standard says should comment out the whole script. This also allows you to use the script on multiple pages without having to include a complete copy of the script in each page. It also allows you to use the script to generate code to be included in each page and which can be globally changed across your site just by amending the script rather than having to modify each page. Doing this actually becomes more useful as your site grows to more pages and so its useful to get in the habit of linking to your scripts in this way from the start even though it may not seem worth the trouble if you only have one or two pages.
But where in the page source should these statements be placed? I still haven't answered that question so I'd better do so now.
The next thing to check for is any code that you want to ensure gets executed before the page gets loaded (eg. a test for if your non-frames page is loading inside someone's frameset). This code needs to be in a script within the head section of your page below the title and any meta tags and link statements.
This article written by Stephen Chapman, Felgall Pty Ltd.