Monday, October 8, 2012

Don’t Initialize All the Things in jQuery.ready()

Don’t Initialize All the Things in jQuery.ready():
If your website utilizes JavaScript and jQuery, which many web sites do, it is very tempting to pre-initialize all of your logic (plugins, widgets, modules, event handlers, etc) in order for them to respond as fast as possible. Unfortunately, initializing ALL THE THINGS during page load works against the user’s goal of loading quickly. Instead of initializing everything when the page is ready you can instead wait to initialize portions of your application until they are needed.

No comments:

Post a Comment