Removing unused YouTube javascript - Help needed

I have just used the Google PageSpeed Insights tool and one of the biggest recommendations it made was to remove any unused javascript. The biggest one of these appears to be YouTube, but I do not have any YouTube videos on my homepage.

I did have a YouTube video there originally, but I removed it, but the insights tool seems to think the javascript is still there. Does anyone know how to check for it and then ultimately remove it, if some is still floating around in the code?

two possibilities.
somewhere you still have a video link OR
webflow has got in a mess in that part where the video was.

For the second option I only once had an issue where this happened to me and was with the light box.
Fix. Create a new section, drag the elements from the faulty one into the new section.
Webflow will re-create the code and clean it up.

Let me know if that makes sense and helps.

Thanks for the suggestion. I rebuilt the sections where there previously was video and I removed some other content.

I managed to shave 2 seconds off the estimated savings, so it now says 4.8s I could save. However, the files it shows that I could get rid of are still exactly the same.

Interestingly, my score on desktop absolutely skyrocketed up to 81 whereas prior it was around 60. So I was happy with that. It seems mobile it doesn’t like so much.

I done an inspect and yes there is youtube in there…
<link rel="canonical" href="https://www.youtube.com/watch?v=5bvJdfpenvI">
is this something you recognise?

1 Like

YES! Oh you genius. I think you may be my favourite person right now.

I forgot I have a collection list on the HP where a modal pops up if you click on it, and within one of these modals there was a video embed. I removed it and my mobile score jumped to 61 and my desktop score is now 94! Incredible.
image

Just shows how much these speed tools don’t like YouTube embeds.

Thank you so much. :grin:

Brilliant, I know how hard it is to find stuff and can take a long time.
I am glad I found the information to jog your memory where it is.
Interesting to see the new score. I spent so much time cleaning my website, doing best practices and so on.
I have 100% on all the scores for desktop, mobile is less but still high.
I use png files through out as well.