Replace Local WordPress jQuery script with Google Library
read more
Categories

Replace Local WordPress jQuery script with Google Library


This tutorial will show you how to replace your local jQuery script which comes with WordPress with one from from Google Library for better performance and reliability. This usually is done optimize website performance and improve website load speed for relatively slow shared hosts. Use of CDN (Google Library in this case) is a great way to reduce load on your server in unexpected traffic spike as less files will be loaded from your server and load would be distributed over Google server infrastructure.

In case you are using your own VPS I wouldn’t recommend to load jQuery from other resources but would minify, combine and gzip it locally which does require some JavaScript skills to combat JavaScript and jQuery conflicts but it is worth it.

What are the benefits from using Google Library CDN for jQuery and other JavaScript libraries?

1. Better performance as Google surely has a better server than you have.
2. jQuery file from Google Library might be already cache in your visitors browser making to load it even faster.
3. jQuery is loaded from the closest Google server.
4. Less load on your server

As you can all benefits are related to website performance and most likely you read this because you are looking to improve your website performance, am I right?