Using Word Press bundled jQuery versus including your own jQuery download or using Googles CDN

As I mentioned earlier, the wp_enqueue_script function allows for a safe load of jQuery (and other includes) into noConflict mode. As long as you deregister and register for jQuery from the Google CDN, the library will load into WordPress with the same noConflict mode protection. I really like to take advantage of Google's CDN, for the variety of performance reasons I mentioned, but for large projects with lots of editors and administrators making different decisions on how to manage the WordPress site and what WordPress plugins to use, I play it safe and register the bundled version into the theme. Also, for development, I find it nice to have jQuery already running locally on my MAMP or LAMP server, if I'm developing a theme and yet have disconnected from the Web due to traveling (or the need for enhanced productivity). Once a site is live, I'll consider switching it over to the Google CDN version of jQuery.

Was this article helpful?

0 0
Blogging For Business

Blogging For Business

Download this Guide And Discover How Start And Run Your Very Own Successful Business Blog. Always Wanted To Start Your Own Blog?

Get My Free Ebook

Post a comment