Re: Best Practice - Javascript at bottom for faster page loads

Sylvain Viollon <[email protected]> Fri, 10 Jun 2011 11:40:51 +0200
Newsgroups gmane.comp.web.zope.silva.devel
Organization Infrae
Message-ID <[email protected]>
On Fri, 10 Jun 2011 10:01:37 +0100
Jonathan Bowlas <j.bowlas-hclig2XLE9Zaa/[email protected]> wrote:

> Hello again Devs,
> 

  Hello,


> Best practice states that Javascript files should be loaded at the
> bottom of the page for faster page loads
> 
> http://developer.yahoo.com/performance/rules.html#js_bottom
> 

  I am aware of that. The best is to include the non required one at
  the bottom.

> How would I do this with silvaconf.resource() calls when inheriting
> IPorto?
> 
> I realise I can hard code the JS files at the bottom, but I would like
> to take advantage of the concatenation and minifying available when
> using silvaconf.resource().
> 


  Unfortunately, silva.resourceinclude doesn't support that (for the
  moment).

  In Silva 3.0, we use a different system, silva.fanstatic, that do
  support this. The syntax for the Silva developer stays the same.

  Regards,

  Sylvain.


-- 
Sylvain Viollon -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands