[Seaside] Script in head tag
Colin Putney
cputney at wiresong.ca
Thu Oct 23 15:10:14 UTC 2008
On 23-Oct-08, at 2:30 AM, Sebastian Sastre wrote:
> 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.
Loading the libraries from Google improves the cachability of the
javascript - as you say, if other web pages load the library from
Google, it may already be in the cache, and we can avoid a network
request to fetch it. But it true regardless of whether you put tags
directly into the head or use google.load().
The value of google.load() is that you can load the libraries
dynamically, based on information only available on the client, or in
response to a user action. If you don't need that capability, it's
better to just put tags in the head, as Lukas suggested.
Colin
More information about the seaside
mailing list