Improving WP speed: external vs own hosted JS

Improving WP speed: external vs own hosted JS
Vota este artículo

One of the best improvements achieved today after some investigation was related with loading locally on the server jquery and js files.

If you keep it on your own host, you have full control, and can access in a snap to it. Also you can benefit from developing locally on you computer without internet connection. That’s great if you travel a lot on high-speed trains, or airplanes, as no external repositories are needed.

Theres a minor issue this way, and its that you need to have always jquery up to date (some plugins require it…. update a working plugin and then you potentially will get a non working one if the newer upgrade requires latest jquery).

But can be easily solved with Jquery update plugin, it works like a charm.

However, there’s a problem. Once in production, serving all files from your host, means that this process includes waiting states depending on the load of your hosting, and most of all, its a great slots consumer. I mean, parallelized communications with hosting its the best strategy to improve speed on wordpress sites.

But as you may be thinking now, this is a finite resource. And parallelizing jquery, js, css, image files, and all this stuff when browser asks for it, means there’s always a bottleneck.

After doing some research, come up with the idea that, leaving resources free on your own server its faster that include all files on your server. Pretty obvious, I know. I always tought that, being your users focalized into an area, like Spain, could benefit from having server on the same country, over having them to look for files on USA or whatever the server’s located.

But got to say, its not this way. Relaying on google for .js files, means that probably your visitor would have it on his browser cache, and that files would be compressed, or at least, those would be picked from his nearest server so, no there would be no lags at all. So even in the case your visitor’s located on the same country that your server is, it would benefit from this strategy. And thats a fact.

How to move all sources from internal to external, how to be sure that we’re pointing latest and compressed versions? This plugin solves it all at the same time, and does its flawlessly: Use Google Libraries. It’s awesome. Period. Just download, activate, and you’re done.

Achieved more or less 33% improvement on loading time. Obviously if you’re are actually relaying on external servers for this, benefits would be lower. Check this tests with tools.pingdom.com

Own hosted (not bad…)

20140413-facemash-es-wp-optimize-donwload-time-seo-sem-development-worpress-quick

Calling AJAX Google API components using plugin:

20140413-facemash-es-wp-optimize-donwload-time-seo-sem-development-worpress-quickest

Kudos to this guy, here is his website.

Deja un comentario