Easy question that I'm sure there is a definitive answer for - I just can't seem to find it. I am referencing an external javascript file via this pretty standard line: <script type="text/javascript" src="/javascript/filename.js"></script> So is there *ANY* difference if I have that line in the header area of the HTML (i.e. between the <HEAD> and </HEAD> tags) ... or should it be after the <BODY> tag?
I think it should be at the end of the file, because the search engines tend to rate the first part of your html code higher than the last part.
hey hacker ron edwards! where are all your sites now in your sig? watch this guy, he will put links in your website that are hard to find... i have proof
just ask tech86 what ronmojohny did. he will know...by the way tech86 can help if you have security issues.
as long as the script occurs before any functions are called in the page, you should be fine although, it may be web standards that it be placed in the head
It used to be a "best practice" to put the js includes in the head, along with your meta and css includes, but i believe it is ok cross-browser to put the js include anywhere in the body now...