WordPress: Use Google Libraries instead of locally hosted ones
As I pointed out numerous times before: speed is important for any kind of operation on the Internet as a better loading performance will improve conversions on your websites. Mozilla managed to increase Firefox downloads by 60 million per year by shaving off 2.7 seconds of loading times on the organization's download pages.
While that is great in theory for a number of reasons, it means that users have to download those scripts when they connect to the service or website for the first time. There is one exception to the rule: if a script has not been modified and is already in the cache of the browser, it won't get downloaded again but loaded from the local browser cache.
One suggestion that developers had in recent time is to switch to remotely offered scripts instead of locally ones. And one of the prime targets for that is Google, as it is hosting numerous scripts on its fast content distribution network for anyone to use.
The benefit of using hosted versions of jQuery and other scripts are the following:
- Improved latency thanks to Google's impressive content distribution network that delivers the scripts from a location close to the user to decrease latency and speed up downloads
- Parallel downloads thanks to being offered from another server. This is especially important if users are working with browsers that limited simultaneous downloads from web servers to 2 connections.
- Better caching thanks to an increased likelihood that the script is already cached for users who connect to your website for the first time.
Especially the third option can speed things up for first time visitors, as the scripts do not have to be loaded at all if the user did download them on another web property previously before.
The WordPress plugin Use Google Libraries changes the location of several locally used scripts to Google hosted ones so that you and your site's visitors can benefit from this.
It is an install and forget about it plugin, as it handles everything in the background. There is no configuration to make, and you should check the effectiveness of the plugin by monitoring your website's network activity after plugin installation.
If you are using Chrome or Firefox, hit F12 and select Network from the tabs listing in the Developer menu that opens here. Reload the web page and look at the scripts that get loaded. You should notice that some get loaded from Google servers instead of the local server.
As far as support goes, the plugin for WordPress supports the following libraries and components right now:
- jQuery UI
If your website is using other scripts, they may still be loaded from the local server and not from the remote server.
One additional benefit from this operation is that you will save bandwidth. Some scripts have a size of 100 Kiloybtes or larger, which you save for every new connection made. If you get 1000 new connections per day, you are saving 100.000 Kilobytes per day, or 36.500.000 Kilobytes per year.
To sum it up: You increase the loading performance of your websites if supported scripts are being used, and at the same time reduce how many bandwidth your website requires.
The only caveat here is that you load resources from Google, which some may see as a privacy risk that they do not want to take.