Add script

S

shapper

Hello,

I am checking my web site according to Yahoo Best Practices and I get
a warning:

Put JS at the bottom
8 external scripts were found in the document HEAD. Could they be
moved lower in the page?

But shouldn't external scripts be loaded on the page head?

Thanks.
Miguel
 
J

Jonathan N. Little

shapper said:
Hello,

I am checking my web site according to Yahoo Best Practices and I get
a warning:

Put JS at the bottom
8 external scripts were found in the document HEAD. Could they be
moved lower in the page?

But shouldn't external scripts be loaded on the page head?

What made you think Yahoo was any authority on web design?

http://validator.w3.org/check?verbose=1&uri=http://www.yahoo.com/
[Invalid] Markup Validation of http://www.yahoo.com/ - W3C Markup Validator

The home page is not nearly as bad as other areas...
 
R

richard

Hello,

I am checking my web site according to Yahoo Best Practices and I get
a warning:

Put JS at the bottom
8 external scripts were found in the document HEAD. Could they be
moved lower in the page?

But shouldn't external scripts be loaded on the page head?

Thanks.
Miguel


JS can be placed anywhere it is needed.
Some script is better at the bottom but not ALL script.
External scripts go in the "head".
Screw their "best".
 
R

richard

All script should be external to the page and referenced in the head only.

http://en.wikipedia.org/wiki/Unobtrusive_JavaScript


that source is about as authoratative as the posters in this group.
the wiki is not the "holy grale".

There are times when JS MUST be deployed at the bottom or in the
<body> tag. JS can also be deployed within other tags as needed.

you should try reading info at the w3c school reference site.
 
S

shapper

that source is about as authoratative as the posters in this group.
the wiki is not the "holy grale".

There are times when JS MUST be deployed at the bottom or in the
<body> tag. JS can also be deployed within other tags as needed.

you should try reading info at the w3c school reference site.

Yes I follow W3C advices ... that is why I thought it was strange
Yahoo advice.

So I am making it right.

Thank You,
Miguel
 
R

rf

richard said:
that source is about as authoratative as the posters in this group.
the wiki is not the "holy grale".

There are times when JS MUST be deployed at the bottom or in the
<body> tag. JS can also be deployed within other tags as needed.

you should try reading info at the w3c school reference site.\

Yeah, right. Watch out for all the errors though.
 
C

Chris F.A. Johnson

Yes I follow W3C advices ... that is why I thought it was strange
Yahoo advice.

There is no connection between the W3 Consortium (W3C) and
w3schools.com.
 
B

Bergamot

richard said:
that source is about as authoratative as the posters in this group.

you should try reading info at the w3c school reference site.

You think w3schools is authoritative? Not hardly, certainly not any more
so than yahoo or wikipedia.
 
J

Justin McConnell

Hello,

I am checking my web site according to Yahoo Best Practices and I get
a warning:

Explanations for all warnings are listed here:
http://developer.yahoo.com/performance/rules.html
Put JS at the bottom
8 external scripts were found in the document HEAD. Could they be
moved lower in the page?

Some browsers stop downloading resources in parallel when they
encounter script blocks. In these cases, If you put the script block
at the bottom of the page then the entire page will load quicker.
But shouldn't external scripts be loaded on the page head?

Who says this? They don't need to be.
 
H

Harlan Messinger

Justin said:
Explanations for all warnings are listed here:
http://developer.yahoo.com/performance/rules.html


Some browsers stop downloading resources in parallel when they
encounter script blocks. In these cases, If you put the script block
at the bottom of the page then the entire page will load quicker.


Who says this? They don't need to be.

The notion of "best practices" (examples may include always using
permitted end tags and always delimiting attribute values in double
quotes in HTML 4.01) implies going beyond that which is required. One
might well classify among best practices for the design of a web page
the idea the body is for the content and the head is for the foundation,
including declarations and definitions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
Martindap

Latest Threads

Top