On Sep 23, 9:56 pm, Olivier Jaquemet <[EMAIL PROTECTED]>
wrote:
> On Sep 22, 4:23 pm, "Justin Perkins" <[EMAIL PROTECTED]> wrote:
>
> > On Mon, Sep 22, 2008 at 3:47 AM, Olivier Jaquemet
>
> > <[EMAIL PROTECTED]> wrote:
> > > And most importantly, is it still true if ones follows the Yahoo
> > > Performance Guideline #6, that is put script on bottom of page.
> > >http://developer.yahoo.com/performance/rules.html#js_bottom
>
> > The technique is an alternative to using page/dom load event listeners
> > and is good for pages with lots of markup.

I think you have misunderstood:

"While a script is downloading, however, the browser won't start any
other downloads, even on different hostnames"

Bottom-loading scripts is beneficial where there is a lot of *script*
and you don't want processing of HTML delayed while the script is
loading.  Of course if you are depending on your script doing a lot of
stuff before the page is useful, it doesn't get you very far to
display the page more quickly if it's still dysfunctional.


[...]
> However you say it's an alternative to "dom:loadded" event, I'm a bit

It was around as a strategy well before "loaded" or "ready" functions
were developed.

> surprise, I had never thought of this.
> Are you sure that on all browser, a script being loaded/executed at
> the end is exactly the same as a script loaded anywhere and executed
> on dom load ?

As the link says, it isn't exactly the same.  However, it is generally
a more robust alternative than "dom:loaded" if you care about support
for more than the 4 browsers that Prototype.js supports.  You may not.


> Asked differently, are you certain

Is anything "certain" in browser scripting?

> that the DOM is fully ready to be
> manipulated by a script inserted at end of page ?

No, but it is more likely to meet that criterion than a synthetic
dom:loaded event (if you want wider browser support).  Modern browsers
make elements available for scripting as soon as they are parsed, even
before the closing tag of their parent element is parsed, older
browsers may not.


--
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to