Archived topic
Remove unused JavaScript Paypal
1 reply · Started by troyw on March 17, 2021
Hey team,
I have read most of the other posts on this forum regarding the 'Remove unused JavaScript' message from Page Speed Insights. I know that the issues are not GP, but are coming from several plugins I have listed in private info.
My question is, are you aware of means to prevent these plugins from loading on the Home page where they are not needed? Or indeed from any page they are not required?
I've messed around with some codes I found online to remove Recaptcha, but they did not work.
I have also explored wp_enqueue & wp_register_script reading lots of forums about this. wp_enqueue & wp_register_scriptall seem to involve some pretty heavy coding stuff and way beyond my understanding. There are plenty of codes around the internet forums, but none I can find seem to address the biggest plugin culprits and are extremely vague on how to create your own specific code.
I know its not a fault with GP, but wonder if you have any ideas how I can address this issue or where I might find some decent instructions and code examples?
Thanks
Hi there,
As much as we'd like to provide the specific PHP snippet for dequeuing these unused scripts, we're not exactly sure what handles these plugin's enqueued scripts use. This will require us to read the plugin coding to know and to be frank, this is outside of our scope.
While you can try plugins like Asset Cleanup Pro, we're not exactly sure as well to how much extent this plugin would help.