View Single Post
Old 28 Oct 2007, 20:12
Princeton's Avatar
Princeton Princeton is offline
Join Date: Nov 2001
Real name: Joe Velez
a browser will download all the objects within the <head> before any objects within the <body> of a document...

a large javascript file (or multiple) will cause a delay in rendering the page (non-cached)

by placing the JavaScript files at the bottom of the page you are telling the browser to download all the objects on the page prior to downloading the JavaScript files (by placing the files at the bottom the end-user will not be affected by the delay in downloading the files)

the point here is to know the difference and to choose one or the other ..
you do not want to place JavaScript files in the middle of the <body> as it will slow the rendering of the page as the browser will have to
1)__ Stop,
2)__ Download the javascript file,
3)__ Parse/interpret javascript file,
4)__ Continue to next object

as you can imagine by placing a large javascript in the middle of the page will cause a visible delay
Former Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web

If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote