Christof, While I agree with your cons in theory, a couple of them can be discounted.
Christof Donat wrote: > > - either you need to do synchronous loading like JSON does or you need to > work > with callbacks as I do. Synchronous loading blocks the browser, callbacks > are > not understood by everyone. > You mention that not everyone understands callbacks (maybe I read it wrongly). Well, it would also be true that not everyone understands JavaScript, and an even smaller number understand jQuery (however easy it may be, the missus just doesn't see the magic that I do). Christof Donat wrote: > > - to load all the scripts your page needs multiple HTTP-Requests are > necessary > which increases the overhead. > While multiple HTTP-Requests do increase overall overhead, that is based on the assumption that the total sum of code loaded is the same as a normal page load (ie, the user loads all or nearly all the modules through their page interaction). I'll actually give this a bye though, because I'm not fully au fait with the performance statistics of multiple on-request HTTP requests, versus single all-in-one HTTP Requests. It'd be great if there was some further discussion on this though. For anyone looking for a quick resource on lazy loading/on demand JS: http://ajaxpatterns.org/On-Demand_Javascript http://ajaxpatterns.org/On-Demand_Javascript Cheers, Dan -- View this message in context: http://www.nabble.com/On-Demand-Javascript--tf2220945.html#a6154824 Sent from the JQuery forum at Nabble.com. _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
