Kevinleary.net, LLC.

Faster Speed in WordPress Using Google’s Hosted JavaScript Libraries

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 google.com!), no cookies or other verbose headers will be sent up, saving precious bytes.

More Resources

Meet the Author

Kevin Leary, WordPress Consultant

I'm a freelance web developer and WordPress consultant in Boston, MA with 15 years of experience building websites and applications. View a portfolio of my work or request an estimate for your next project.