Hello, everyone. Marketing made easy is here. And today we will talk about optimization of Youtube videos. How to place a video on the web site and how the video kills the speed of loading a web page. Well, here we go!
In my previous videos, I assured everyone that video is the best content format for any web site. In the article "How to create a blog in 2020?" I said that most people are visual learners that better perceive information through eye sight. Video remains in our memory for a long time. This is because while watching it, the organs of vision and hearing are used simultaneously, as well as 50% of the brain.
If you look at video content from a search engine optimization point of view, video affects the position of the web site not directly, but through improving the behavior of site’s visitors. They will watch the video and thus will stay on the web page longer.
The search engine takes into account the duration of viewing the page as a metric of behavior. And I want to remind you that user behavior is a factor in the ranking in search engine output. The presence of 2-3 videos on a page can increase the duration of viewing up to 3-5 minutes. This is because the era of the Internet has made us too lazy to read the text, as most people will prefer video when choosing between reading and watching.
It's very simple to publish a video on a web page. You create your own channel, upload the video to Youtube and put a fragment of iframe code on the web page.
But the video screws the behavior and the speed of page loading ‘’cripples’’. All the problem is in iframe code. When loading a web page, except for the data needed to visualize the content, the browser loads a large number of external JS-code for YouTube player, which slows down the speed of the site. And remember that since 2018 the download speed has become a ranking factor.
For the experiment, I have created two new pages. The first page is without video, the second is with video. Let’s check the pages in pagespeed insights and see how video content on page B "cripples" the parameters of the download speed. There are 2 solutions to fix this problem.
Lazy load for video
The first solution is simple. If your site is developed on a CMS platform - Joomla, Wordpress or Drupal, you just need to install and configure one of the lazy load for video plugins. As in my case, the plugin will do everything for you.
"Specially trained" script and CSS-style
The second solution is more complicated. You need to connect the "special training" script and CSS-style to the web site. After that, at the page rendering stage only video images and the ‘’play’’ button will be loaded instead of video. And external JS code of YouTube player will start to load only after the user clicks the "play" button. To implement this solution you don't need to know JavaScript programming language - the Internet is full of instructions on this topic with ready code.
The loading attribute = "lazy"
There is one more solution to this problem. The developers of Chrome browser in 2019 created a special attribute loading = "lazy", which allows to postpone the execution of YouTube iframe-code until the user begins to interact with the screen where the video is placed. But this solution has a number of disadvantages: firstly, the attribute is supported by Chrome starting from version 75 and secondly - other browsers do not support this attribute at all.
That's all for today. If this video was useful to you - click the like button. See you online. To be continued.