by MikeGale » Wed Feb 09, 2011 5:34 pm
This is an area where I disagree (as a blanket suggestion).
Like all things web it depends on what you're doing.
Where you're designing your own content, HTML, images, script, back end services I think you can often ensure that script at the top is a good idea. (There was a debate about this many years ago. I can't recall the details, but it left me inclined to script at the top.)
With image heavy pages, and a lot of third party scripts (which you don't bother to integrate into a few coherent script files) the advice might have more importance.
I'd love to see an analyis of this. Different browsers, different page designs and philosophies. That would give a more rounded view. On top of that what impact do already loaded scripts have? Presumably the first page has the load and later pages don't...
I'd love to see a scientific evaluation. In the absence of that I'd make sure the suggestion is compatible with the range of what happens.
(I personally like to see developers encouraged to do things a bit smarter and simpler, especially in this age where script is often misused. There is a site I visit often. It was redesigned recently. I think the scripts are loaded late, then they do a lot of work. After the page is loaded I go away and do something else until the code has all run (then navigation works!!) If that's what's going on, late script loading, it's a prime example of abuse. I did have a look at the code while I was discussing the site with the creators, it was too much to get my mind around in the time available!)