That is a pretty good question, and an issue that most of us have run into at one point in time.
I think that there are a few different things that you can do to overcome this issue:
1) Place the code in an external JS file and link to it
2) use CSS to push the content to the top
3) not worry about it and focus on strenghtening your site in other areas (ex: link pop)
I am not sure what level of impact this will have on your site. I think that it is pretty important to take care of, but at the same time I have seen some top ranking sites with a mess of code at the top.
|brotherhood of LAN|
calling it externall also helps reduce your source code size, which is thought to be helpful in gaining better google rankings.
I was once running 3rd party ads and the bloated code i had to use doubled my file sizes before I started calling it externally. In the end...
Each page had one line of code instead of the full script. (faster loading - less space taken) and I *believe* it helped ranking.
>>How vital is this, and how big a hassle is it for developers who write code using Dreamweaver, etc ?
A major benefit of keeping your code external is ease of maintenance. I inherited a site that had a bunch of JS on each page that wasn't 100% consistent from page to page. Once I cleared that out from each page & did it externally, maintaining the code was a snap, and any changes only required one file to be uploaded.
<added>The same thing works for CSS, by the way, and elements that can be inserted via SSI. The latter won't help your page size, but will simplify maintenance.</added>
For my site, everything that is not "one-place" code is in a file. But that leaves a couple of pages that have odd js routines (including index). In my case, the combined page (html + js) was so small (about 8k) that I think there would be more of a performance penalty to get the separate js file.
My site is too new to see any effect in the search engines yet.
Good points... let me add this question out there... if my site has a bunch of images that cause it to load slowly... does that impact my PR?
|brotherhood of LAN|
It shouldnt wangdy, but then again, high PR wont sway the visitor to stay for a slow loading picture!
For Dreamweaver users,
There is an extension for inserting external JS. I haven't used it myself, but it sounds pretty helpful. Only recently started thinking about linking to external JS (to speed up an already quick download).
I only have a dozen or so pages on my site and I'm going to cut and paste a link to the external JS.
Ive always assumed that one of the best advantages of external js (and I guess css for that matter) is also that it is cached, so that if the same js or css is used by many pages it only needs to actually loaded once, cutting down on loading time very significantly if you have a lot of css or js.
I use external .js files on nearly every page I've ever made, and I'm convinced it is A Good Thing for all the reasons mentioned.
Regarding slow-loading graphics and page rank: I doubt there would be any direct effect on page rank, but if pages are painfully slow other sites will be less likely to link to them. This would mean you'd have less chance to develop the page rank that your content would otherwise deserve. It's worth doing everything you can to streamline your graphics.
one thing to remeber is that, if a page takes too long, its useless.
example, im on broadband and come accross pages that take upto 10 seconds to laod, if you were on a serial, bugger that, go somewhere else.
do not design for yourself design for a lowest common denomenator, easy graphics, easy linking, easy to understand, and easy on the recipients computer.
work on theme content across the site, rather than loading 10 pages with terms, that could easily with enough research split into another 10/100 pages