3rd parties
The 3rd parties insight flags resources that are included on your website but are not hosted on your server. These third-party scripts can block your page's critical rendering path and slow down your site's performance.

Reduce and defer loading of third-party code to prioritize your page's content. Learn more about optimizing third-party JavaScript
Understanding 3rd parties
Third-party resources are scripts, stylesheets, or other assets that come from external domains, meaning they can add extra network requests and processing time to your page. Common examples include analytics tools like Google Analytics, social media widgets, advertising scripts, chat widgets, and embedded videos.
When third-party scripts load early in the page display process, they can slow down or block the content rendering, which also hurts Core Web Vitals scores like Largest Contentful Paint (LCP) and First Input Delay (FID).
How to improve 3rd parties with WP Rocket
WP Rocket offers several features to help reduce the impact of third-party scripts:
- Delay JavaScript execution - delays all JavaScript files, including third-party scripts, until user interaction.
- Load JavaScript deferred - adds the
deferattribute to JavaScript files, allowing the browser to continue parsing HTML while scripts load in the background. - Preload fonts - this feature detects and preloads the fonts used in the above-the-fold texts.
- Preconnect to external domains - resolves DNS lookups for third-party domains early, reducing the time needed when those resources are actually requested.
- Self-host Google Fonts - When enabled, WP Rocket detects Google Fonts in your website and hosts them locally on your own web server.
- LazyLoad - This can improve the performance of externally hosted images, iframes, embeds, and widgets so they only load when needed (like when they enter the viewport).
For third-party scripts that need to be excluded from delay or defer, you can add them to the exclusion lists in the respective feature settings. However, keep exclusions to a minimum to maximize performance benefits.
How to improve 3rd parties if WP Rocket can't help
If you need additional control over third-party scripts, consider these options:
- Remove unnecessary third-party scripts - audit your site and remove any third-party tools that are not critical to your website's functionality, especially if you are using multi-purpose themes.
- Use async loading for non-critical scripts - for scripts that don't need to run immediately, use the
asyncattribute to load them without blocking page rendering. - Host critical scripts locally - if possible, download and serve essential third-party scripts from your own server to reduce external network requests and improve load times.