Site logo

Archived topic

Unused CSS/Javascript

3 replies · Started by Matthew on May 28, 2021

Viewing posts 1–4 of 4

My pagespeed insight scores aren't where they should be, especially for this post where I embedded a YouTube video. According to Google this is because of unused CSS/Javascript. I searched this forum and found similar cases where it was stated there is no solution to this problem.So, my question is, is that still true? And, if so, do I just do nothing and hope for the best?

Hi there,

in that instance - no - as the CSS file its complaining about is the YouTube style sheet that video player requests.
This won't change that issue but you may want to look at using a plugin to defer the loading of the YT player scripts until they're required - this plugin does that:

https://wordpress.org/plugins/wp-youtube-lyte/

The YouTube Lyte plugin worked great. Thank you!

Glad to be of help

This archived topic is closed to new replies.