[Seaside] Script in head tag

Lukas Renggli renggli at gmail.com
Thu Oct 23 09:51:18 UTC 2008


> That's what I was doing so far. Using google.load has the advantage of getting
> the libraries with no requests when other site was visited by the user and has
> requested those already (which will occur if that site also used google.load and
> the very same version of the libraries of your app of course). You can bet that
> is efficient.

I can hardly believe that. First the Javascript VM is loading the
Google Library. Then you call that library to load other libraries.
This patches the DOM and adds references to these other libraries that
are then loaded. If you had put these other libraries in the head from
the beginning, the browser would have started to load them
immediately. Maybe I am misunderstanding something?

> PD: I've observed in #writeHeadOn: a grouped write (element, scripts and
> stylesheets) which breaks order of what you ask root to render. I'm reviewing it
> because strict order is crucial for using this.

#addScript: and #addStyle: are actually ment for internal use. It is
currently used by the methods WAComponent>>#styles and
WAComponent>>#scripts. The order is well thought (see the discussions
a few years ago in the mailing list).

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list