Dec 072015

Share with:


Examine page with videoIn part 1 of the post, we looked at optimizing images, javascript, CSS and the nasty, slow WordPress "emoji" script. We sorted these and reduced the page loading from approximately 3.7 seconds to 2.8 seconds. Looking at the "waterfall" figures on shows that the embedded YouTube video easily adds an extra 600 ms to the load times. This is made up mainly of various ad tracking scripts (of course, Google/YouTube only exists through ads!). Ok, using "free" services means living with these but not if it will impact your page rankings! So the solution is broadly to load the page without the scripts and only load the scripts when the visitor clicks on the video to play it. This way, the search engine algorithms will find a low page load time and the site visitor will experience a quick page load with a slight delay when the video is played.

Methods Compared

Well, like anything on the internet, there is more than one way to solve a problem. My preference is naturally always to use the minimal impact method when possible. So the technique used was to adapt a script on the very useful site. But to satisfy non-geek types reading this, I actually compared loading times using own script to a WordPress plugin called "Lazy Load for Videos". And to my great surprise, the difference was less than the variation that one gets when testing the load time on any online tester.

With the plugin, all you do is install it and where you want the video on the page, just put in the video address (use "" where xxxxxxx is the video ID) - do not use the embed YouTube code. There are also settings for various parameters on the plugin settings area and I used the default ones. It is a nice little plugin but I cannot say that it will not clash with your theme or other plugins you might have installed!


Page Speed 7th Dec 2015

Click to Enlarge

So using the smart loading of the video reduced the page load time by about 600 ms to around 2 seconds. This now brings the total time to the researched figure that is found to prevent high "bounce" rates. This is when a typical visitor will no longer wait and click on another site.

So far, the effort involved to improve the page load time is something that can be done in half a day by a reasonably skilled web technician. And all the resources used are free. The next stage of improving these times would be to reduce the first byte response time. On this site, this would involve using a better (non-free) CDN than Cloudflare and possibly tuning or changing the hosting server (this site is on a shared server). The technician time cost will become significant too. This moves us into the realm of the ROI (Return On Investment) and the aim of the site owner.


Share with:


EU Cookie Law

This site uses cookies to improve user experience and help track affiliate links. It does not pass any private or user identifiable information. Usage of this site implies agreement to this policy. Click on the X (above) to hide this box.