Use the Use Google Libraries plugin to replace all JavaScript libraries used in WordPress with Google hosted libraries.

Why is Google a better option than self hosted?

  1. Automated updates – Caching can be done correctly, and once, by us… and developers have to do nothing
  2. Gzip works
  3. Potentially the greatest benefit of using the Google AJAX Libraries CDN is that your users may not need to download jQuery at all. If they’ve visited another site that was using Google’s jQuery, then it’s already stored in their browser cache.
  4. We can serve minified versions – The files are hosted by Google which has a distributed CDN at various points around the world, so the files are “close” to the user
  5. The servers are fast, and use a CDN to deliver files faster than your host probably does.
  6. A subtle performance (and security) issue revolves around the headers that you send up and down. Since you are using a special domain (NOTE: not!), no cookies or other verbose headers will be sent up, saving precious bytes.

More Resources

About the Author

Kevin Leary is a freelance developer in Boston, MA with a strong portfolio of work, and over 13 years of experience as a programming consultant and digital strategy provider. Interested in working together? Hire me for your next project.