fbpx
Today:November 28, 2020

Defer parsing of Embedded Videos

When we use videos Like Youtube, Wistia, Vimeo, etc. Webpage speed will suffer a lot. Google has recently announced Google Search ranking is purely based on the PageSpeed.

Here is an easy way to defer your video that uses scripts.

Below is sample YouTube video Embed Link :

Change the above code a bit to apply a trick.

Now we need to use small Javascript code to load the video without any issue.

above javascript code will set the src=”” URL from copying the original video link from data-src=”” attribute.

That’s It. Now your page will load even faster. See how your site performs using GTMatrix

Share

5 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

sixteen + ten =

Top