Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ShareThis

    (@sharethis)

    Hi Matt,

    Thank you for reaching out to ShareThis support! We appreciate your focus on optimizing your website’s performance, especially regarding Google PageSpeed Insights recommendations. I’d be happy to guide you on both minifying and deferring JavaScript to achieve better results. How We Can Address Your Concern:

    1. JavaScript Minification:
      Minifying JavaScript removes unnecessary spaces, comments, and formatting, helping reduce file size. This ensures faster code delivery and improves your website’s loading speed.
    2. Deferring JavaScript:
      Deferring scripts allows the browser to load the main content (HTML and CSS) first, and execute JavaScript only after the page renders. This helps avoid render-blocking issues, resulting in a better user experience and improved PageSpeed scores.

    Optimizing ShareThis Scripts for Your Site:

    Our ShareThis tools are designed with performance in mind. However, you can take additional steps by:

    • Adding the defer attribute to our script to ensure it loads after your page content:
       <script src="https://platform-api.sharethis.com/js/sharethis.js" defer></script>
    • Minifying any custom JavaScript you may have on your site. We recommend tools like Terser or UglifyJS for easy minification.

    Need More Help?

    If you need further assistance or encounter any issues during implementation, please don’t hesitate to let us know. We’re happy to assist you with any additional questions or adjustments.

    Best regards,
    ShareThis Support Team

    Thread Starter mattwmc2001

    (@mattwmc2001)

    I think the issue is the script comes from a third party (you) via the plugin and doesn’t come with defer or is minified. Just look at the url code and you see the script isn’t minified.

    • This reply was modified 1 month, 1 week ago by mattwmc2001.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.