• Hi All,

    I am trying to speed up my page a bit. I have been using Lighthouse to assess my page performance and it looks like there is a bit of unused JS. I am running a coverage report and I can see that there is one CSS file in particular that is completely unused.

    How do I go about removing unused files and how can I go about improving the files that are partially used?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tdammon

    (@tdammon)

    I can type a question into ChatGPT myself.

    Moderator threadi

    (@threadi)

    Basically, you can expand existing scripts in WordPress with https://developer.ww.wp.xz.cn/reference/functions/wp_dequeue_script/. However, this only works if the scripts in question have been integrated according to the WordPress standard. Unfortunately, there are some plugins that do not comply with this – in this case you would have to contact the plugin developers.

    An additional problem is that Google’s Page Speed reports that scripts are not being used – but this only affects the one specific page that was checked. The scripts in question could definitely be needed on another page. Expanding it in the above-mentioned way would therefore paralyze parts of the website.

    If you are confident about expanding, you can use the above function. Include them in your child theme or using a code snippet plugin.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Removing Unused JS’ is closed to new replies.