
Originally Posted by
Jeff Mott
No, it doesn't depend on any of those things. You're talking as if the browser will sit around and wait unless the scripts are at the top. That doesn't make any sense. If your scripts are at the top, then the scripts will download first. And if your scripts are at the bottom, then your images and content will download first. At no point are you delaying downloads.
Unless you are running something in the scripts that manipulate the DOM or add/remove content/classes, etc... which most scripting nowadays tends to do... I think that's the difference... if you're just loading scripts for... well, the sake of loading scripts, then maybe. Splitting hairs really -- if it feels faster to users to put them in BODY, we should put them in BODY for that reason alone.

Originally Posted by
Jeff Mott
1. You're putting too much emphasis on file size. The great thing about performance research is that it tells us where the bottlenecks are, and HTTP requests are the biggie. It's pretty common for the browser to spend 80% of its time just waiting for a connection, and only 20% actually downloading data.
Preaching to the choir on that one. 200ms 'real world' average per file request, only 4 to 8 at a time for overlap, and on crappy connections it can be as much as two seconds; Trust me, I regularly visit Coos County NH where 33.6 dialup is the fastest connection available at ~1200ms ping times. Can't even get wireless phone coverage. It's why I advocate NOT using endless mutliple scripting files and combining them down before deployment, and using image recombination techniques like the incorrectly named "CSS Sprites".
Off Topic:
Always feels like a dream when I get home to 22mbps at 100ms ping to most of Europe and 500ms+ to chicagoland. (that whole new england backbone divide thing -- faster 3000+ miles across the pond and to all of Canada than I am to Boston which is only 110 miles away).

Originally Posted by
Jeff Mott
2. You consider jQuery cryptic and hard to maintain... that's fine, that's a valid opinion. All I can say here is that almost everyone disagrees.
Yup, and it makes me wonder just what the devil is in that kool aid.... Maybe it's that three decades plus of writing software, much of it in interpreted languages that drilled home the concept that libraries in an INTERPRETED language, much less one reliant on a narrow pipe, is a REALLY BAD IDEA.
Off Topic:
Or that I'm a Wirth language fan, and as such HATE unnecessarily cryptic code. Why I think Rust, Ruby, and a whole host of other languages are idiotic nonsense; Hell, I'd rather hand assemble 8k of RCA 1802 machine language and enter it 8 bits at a time on toggle switches than deal with 100 likes of C code for the same reason; pointlessly and needlessly cryptic... and when it's pointlessly cryptic compared to machine language, why bother even having the high level one?

Originally Posted by
Jeff Mott
But good programmers who use jQuery do so because it lets them write simpler, shorter code.
Which is funny because I've rarely actually seen that -- usually it's bigger with jquery, but that's typically because the people who use it then rant and rave about nonsense like "don't use WITH" or "objects for EVERYTHING". Either that or it's stupid annoying animooted nonsense that shouldn't even be on the website in the first blasted place and just pisses me off as a user. Really that's about the only thing jquery allows coders to do faster/smaller; annoying animated nonsense that just gets in the way of delivering CONTENT.

Originally Posted by
Jeff Mott
It's probably fair to say that libraries like jQuery make good programmers better, and bad programmers worse.
I'd say it makes them both worse -- because I've yet to see a website not made worse by it's very presence.
Bookmarks