Add script

Discussion in 'HTML' started by shapper, Dec 11, 2008.

  1. shapper

    shapper Guest

    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
    shapper, Dec 11, 2008
    #1
    1. Advertising

  2. shapper wrote:
    > 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...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Dec 11, 2008
    #2
    1. Advertising

  3. shapper

    richard Guest

    On Wed, 10 Dec 2008 18:35:14 -0800 (PST), shapper <>
    wrote:

    >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".
    richard, Dec 11, 2008
    #3
  4. shapper

    Nik Coughlin Guest

    "richard" <> wrote in message
    news:...
    > On Wed, 10 Dec 2008 18:35:14 -0800 (PST), shapper <>
    > wrote:
    >
    >>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".


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

    http://en.wikipedia.org/wiki/Unobtrusive_JavaScript
    Nik Coughlin, Dec 11, 2008
    #4
  5. shapper

    rf Guest

    "Nik Coughlin" <> wrote in message
    news:ghq7eu$oel$...
    > "richard" <> wrote in message
    > news:...
    >> On Wed, 10 Dec 2008 18:35:14 -0800 (PST), shapper <>
    >> wrote:
    >>
    >>>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".

    >
    > All script should be external to the page and referenced in the head only.
    >
    > http://en.wikipedia.org/wiki/Unobtrusive_JavaScript


    And wikipedia is a more authoritive reference than Yahoo?
    rf, Dec 11, 2008
    #5
  6. shapper

    richard Guest

    On Thu, 11 Dec 2008 18:12:29 +1300, "Nik Coughlin"
    <> wrote:

    >"richard" <> wrote in message
    >news:...
    >> On Wed, 10 Dec 2008 18:35:14 -0800 (PST), shapper <>
    >> wrote:
    >>
    >>>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".

    >
    >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.
    richard, Dec 11, 2008
    #6
  7. shapper

    shapper Guest

    On Dec 11, 5:39 am, richard <> wrote:
    > On Thu, 11 Dec 2008 18:12:29 +1300, "Nik Coughlin"
    >
    >
    >
    > <> wrote:
    > >"richard" <> wrote in message
    > >news:...
    > >> On Wed, 10 Dec 2008 18:35:14 -0800 (PST), shapper <>
    > >> wrote:

    >
    > >>>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".

    >
    > >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.


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

    So I am making it right.

    Thank You,
    Miguel
    shapper, Dec 11, 2008
    #7
  8. shapper

    rf Guest

    richard wrote:
    > On Thu, 11 Dec 2008 18:12:29 +1300, "Nik Coughlin"
    > <> wrote:
    >
    >> "richard" <> wrote in message
    >> news:...
    >>> On Wed, 10 Dec 2008 18:35:14 -0800 (PST), shapper
    >>> <> wrote:
    >>>
    >>>> 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".

    >>
    >> 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.\


    Yeah, right. Watch out for all the errors though.
    rf, Dec 11, 2008
    #8
  9. On 2008-12-11, shapper wrote:
    > On Dec 11, 5:39 am, richard <> wrote:

    ....
    >> 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.


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

    --
    Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
    Chris F.A. Johnson, Dec 11, 2008
    #9
  10. Chris F.A. Johnson wrote:
    > On 2008-12-11, shapper wrote:
    >> On Dec 11, 5:39 am, richard <> wrote:

    > ...
    >>> 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.

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


    Unfortunately too many are duped by the name!

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Dec 11, 2008
    #10
  11. shapper

    Bergamot Guest

    richard wrote:
    > On Thu, 11 Dec 2008 18:12:29 +1300, "Nik Coughlin"
    > <> wrote:
    >> "richard" <> wrote in message
    >> news:...
    >>> On Wed, 10 Dec 2008 18:35:14 -0800 (PST), shapper <>
    >>> wrote:
    >>>
    >>>> I am checking my web site according to Yahoo Best Practices
    >>>
    >>> Screw their "best".

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

    >
    > 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.

    --
    Berg
    Bergamot, Dec 11, 2008
    #11
  12. On Dec 10, 6:35 pm, shapper <> wrote:
    > 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.
    Justin McConnell, Dec 11, 2008
    #12
  13. Justin McConnell wrote:
    > On Dec 10, 6:35 pm, shapper <> wrote:
    >> 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.


    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.
    Harlan Messinger, Dec 11, 2008
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. babu dhayal via .NET 247

    How to add shared assembly in the add reference

    babu dhayal via .NET 247, Aug 5, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    6,214
    Nelson Xu
    Aug 17, 2004
  2. Chad Scharf
    Replies:
    3
    Views:
    865
    Chad Scharf
    Oct 18, 2007
  3. rs387
    Replies:
    3
    Views:
    265
    rs387
    Oct 2, 2008
  4. Rajat
    Replies:
    3
    Views:
    688
    Jorgen Grahn
    Jan 8, 2010
  5. VYAS ASHISH M-NTB837
    Replies:
    2
    Views:
    550
    Jan Kaliszewski
    Jan 7, 2010
Loading...

Share This Page