• Resolved lucytech

    (@lucytech)


    my lighthouse report is telling me: I have a potential saving of 80.7 KiB from 123.9 KiB on mobile for the /sdk/js?client-id=…(www.paypal.com) file.
    Is there anything I can do about this?

    I have WP Rocket installed and set up.
    Thanks

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @lucytech,

    If you are looking to improve performance, I suggest disabling the Mini Cart buttons: https://woocommerce.com/document/woocommerce-paypal-payments/#faq-paypal-scripts-on-every-page
    With this button location enabled, the PayPal scripts are loaded on almost every page of the site.

    Kind regards,
    Niklas

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    We have not heard back from you in a while, so I’m marking this thread as resolved.
    Hopefully, you were able to proceed as advised above.
    If you have any further questions, please feel free to reopen this topic or create a new one.
    Thanks!

    Kind regards,
    Niklas

    Thread Starter lucytech

    (@lucytech)

    Thanks for your help.

    But I need to have the mini cart… this is a e-commerce website and that is the norm for a good shopping experience.

    Do you suggest only showing the paypal option on the checkout page and not in the minicart?

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @lucytech,

    You can still use your Mini Cart. But when the PayPal buttons are enabled on the Mini Cart, then the PayPal scripts will also be loaded on every page of your site where the Mini Cart is active. And the Mini Cart is almost omnipresent.

    Do you suggest only showing the paypal option on the checkout page and not in the minicart?

    Yes, precisely. This button can be disabled from the bottom of the Standard Payments tab: https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-mini-cart

    I hope this helps!

    Kind regards,
    Niklas

    Thread Starter lucytech

    (@lucytech)

    I disabled it from the mini cart but when I load the product pages it still says in the browser (edge, chrome) at the bottom – waiting for t.paypal.com or paypal.com

    why is that? How do I speed that up?

    • This reply was modified 1 year, 11 months ago by lucytech.
    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @lucytech

    The scripts are loaded on all pages where the buttons are enabled. So this looks like the single product page buttons are still enabled.

    These buttons appear to not show on your product pages, but this may be an issue with the theme. Regardless of whether they are rendered, the scripts are still loaded.
    From the Standard Payments tab, you can decide on which pages you want the buttons to be loaded. I suggest only keeping Cart and Checkout enabled if you want to reduce how often the scripts are loaded.

    Kind regards,
    Niklas

    Thread Starter lucytech

    (@lucytech)

    Thank you!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘reduce unused javascript’ is closed to new replies.