[Seaside] slow picture loading
Gastón Dall' Oglio
gaston.dalloglio at gmail.com
Tue Nov 27 21:03:00 UTC 2012
Hello.
2012/11/27 Paul DeBruicker <pdebruic at gmail.com>
> It looks like the images aren't loaded until after the Javascript is
> loaded and compilied. Can you move the javascript to the end of the
> document rather than having it in the HEAD? I don't use pier so don't
> know if that's easy or not. Also the bootstrap JS relies upon jQuery so
> you might benefit from having jQuery load first. Not sure about the
> pier.js stuff.
>
>
> I just use a component at the end of the page with a render method like
>
> addJsToPage:html
> html script resourceUrl:'js/JQuery.minjs'.
> html script resourceUrl: 'js/site.js'
>
> at the base of my main component to load JS at the end.
>
>
>
For full control of where (in head or body) and the order in that the
external resources are loaded in Pier based apps, instead to use Libraries
configuration, I make a PierFrame subclass like this:
PRPierFrame subclass: #MyPierFrame.
MyPierFrame>>renderContentOn: html
super renderContentOn: html. "this render Pier components..."
html script resourceUrl:'js/JQuery.minjs'. "Load resources at end of
body"
html script resourceUrl: 'js/site.js'
html document addLoadScript: ((html jQuery: '*[title]') removeAttribute:
'title')
Then I register this class as root component in the app.
This is
my 2cents.
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20121127/301a11c7/attachment.htm
More information about the seaside
mailing list