[Seaside] Non-blocking jQuery load

Johan Brichau johan at inceptive.be
Thu Nov 19 21:31:46 UTC 2015

Hi Joachim,

jQuery load is an ajax request and should thus not be blocking any browser action.

What kind of interaction are you expecting from the ‘click’ to which the browser is not responder? 
A page request, an ajax request, the execution of a javascript program, ... ?


> On 19 Nov 2015, at 09:59, jtuchel <jtuchel at objektfabrik.de> wrote:
> Hi,
> in our application, the user sees a dashboard right after logging in.
> Depending on the configuration of this dashboard, load and render times can
> get quite long.
> So we tried to wrap slow components into a Decoration that uses load() to
> postponbe the loading of their content. The render code in our decoration
> looks like this: 
> 	replaced
> 		ifTrue: [div with: [self renderNextOn: html]]
> 		ifFalse: [
> 			html document addLoadScript: (
> 				(html jQuery: self idSelector) load html: [:r |
> 					replaced := true.
> 					self renderNextOn: html]).
> 			div with: [
> 				html image src: someSpinnerImage
> 				html space; text: self message]]
> Thus, we hoped, the page would display very quickly, and be responsive
> before all the widgets are loaded.
> So far, we've reached one of the two goals: the page now loads quickly and
> the widgets use ajax to load their contents later. Another nice side effect
> is that if you go back to the start page, all widgets are loaded already.
> The other goal, however, is not met: If you log in and immediately click on
> one of the menu items, the browser won't react to your click before all
> widgets have finished loading. So it seems like jQuery's load is blocking.
> We've tried in Chrome and Firefox, and both expose this behavior. 
> Does anybody know how to not only cheat on the load times of our dashboard
> but also enable the browser to react on clicks before all widgets have
> loaded their contents?
> Any hint is appreciated,
> Joachim
> --
> View this message in context: http://forum.world.st/Non-blocking-jQuery-load-tp4861881.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list