YouTube slow down (third party javascript)
-
I just embedded a single YouTube video which has slowed down the page tremendously
I am using the elementor and wp rocket 🚀
And tried the wp rocket lazy load the iframe and but didn’t work amd also tried to place a image overlay in elementor
Didn’t work what to do
Please help
Thanks
(Please check the page Speed insight results for this page )
The page I need help with: [log in to see the link]
-
What you’ve just described is normal. A YouTube embed is not just a video, but it’s also all of the javascript and trackers from YouTube as well.
That’s the trade-off.
The good news is, it wasn’t that big of an impact, since the page loads in 1.9 seconds: https://gtmetrix.com/reports/www.cloudcreatr.com/3aMgqqyL/
But if I could reduce YouTube it would be a drastic change
It shows in Google page Speed insight
The only way to “reduce YouTube” is to not embed YouTube.
The story starts with a issue called as ‘reduce the impact of third-party code in page Speed insight
This occurred when I embedded the YouTube video on my page with elementor video widget
This drastically reduced my speed and score in page Speed insight
Screenshot of the error
https://drive.google.com/file/d/17d8NYnJ06G9VRcLZpvtr_ojqjs7Cbav5/view?usp=drivesdkAfter researching I came across some plugin like wp youtube lyte and wp rocket 🚀
I use wp rocket
There’s a option in wp rocket to replace the YouTube iframe with preview image, which I turned on
But unfortunately it didn’t worked for me,
I even used wp youtube lyte but no change in speed and score it was still worse
There’s was no change in speed after I turned the video optimization in respectively plugins
The page was build with elementor
Then I started to test
In test 1
(Wp rocket ‘YouTube iframe with preview image’ was turned on)
I made a page (blank canvas) with the native wordpress editor and only embedded the YouTube video(only pasted the link in Gutenberg block editor and published),
then I saw that the Google page insight score were amazing and there were no issues about the third party code impact
After that
I removed the option/turn off the option in wp rocket about replace the YouTube iframe with preview image.
The score went worse and it showed the issue of third-party impact
Still I am using the blank canvas build in test 1
Then I again turned the option on and Page speed insight score improved
Screenshot
https://drive.google.com/file/d/17YpQ_j8IhFd3OhYgayUGqPa-Cm3vnNyd/view?usp=drivesdkThis tells that the wp rocket and wp YouTube lyte was working properly
Test 2
This time I created a blank page with elementor and I embedded only the YouTube video using the video widget in elementor and this time the wp rocket ‘replace the YouTube iframe with preview image’ was turned on
I checked the scores and I found the score and speed were still worse and showed the error
Reduce the impact of third-party code
Screenshot of the error
https://drive.google.com/file/d/17d8NYnJ06G9VRcLZpvtr_ojqjs7Cbav5/view?usp=drivesdkThis show that there’s something bug in the elementor video widget that doesn’t allow wp rocket and wp YouTube lyte to optimise the YouTube video for speed or replace the iframe
Hope you understand
Please 🙏 anybody fix this issue
I embedd a lot of video and I use elementor
Inspite of turning on the optimization options (replace YouTube iframe with preview image) in wp rocket
elementor video widget slow down the website
And shows the error in page Speed insightThere’s is a way around for this issue/alternative
Use text editor widget in elementor
Place the link of YouTube video directly in the text editor
Then YouTube video will be embedded
Then it will be optimised by wp rocketBut there’s no much styling option
It’s not well optimised in terms of design
You can use the features you get in video widget elementorPlease fix this issue as soon as possible
Eagerly waiting for your replyThe story starts with a issue called as ‘reduce the impact of third-party code in page Speed insight
This occurred when I embedded the YouTube video on my page with elementor video widget
That’s because YouTube’s embed includes its own cookies from youtube.com, which now run on your site, and are therefore third-party cookies.
—
Anyway, I recommend taking a step back. I read everything you wrote, but at the end of the day it’s a lot to say that you did indeed embed a YouTube video, and you got all of the junk that YouTube includes with their embeds.
This is _not_ an issue, this is how YouTube works.
If you want to embed a video without all of YouTube’s junk, upload the video to your site instead, then it will be just the video and WordPress’s light built-in player: https://ww.wp.xz.cn/support/article/video-block/
If you embed a YouTube video though, you’re going to get everything that YouTube sends with it.
If I don’t embedd the YouTube videos on my site then I will not be able to drive site traffic to YouTube
Also a lot of bandwidth will be consumed
I used the way around mentioned above and it solved the issue Temperly
But elementor needs to fix the video widget
Ok, topic continues at https://ww.wp.xz.cn/support/topic/youtube-player-slow-down-the-website/
The topic ‘YouTube slow down (third party javascript)’ is closed to new replies.