An interesting post from Dave Ward came my way today which outlines a few conditions in which the jQuery Ready event my actually increase perceived load times.
…what if $document.ready is slowing you down? In this post, I’m going show you specific instances where postponing startup code until the document’s ready event slows perceived page load time, could leave your UI needlessly unresponsive, and even causes initialization code to run slower than necessary.
While I always do make a conscious decision to separate library and application code from my initialization methods, I’m starting to wonder if I should be paying more attention to applications similar to his examples.
Dave concludes that this certainly isn’t applicable in all situations. True, in fact, I’d say it’s always the safe bet to include your init routines in a ready event. When you get to the point where performance optimization matters, these are some great points to consider.
via Don’t let jQuery’s $document.ready slow you down | Encosia.
