Performance
perf/third-party-cost
Each third-party script earns its place, loads late, and heavy embeds (video, maps, chat) start as a lightweight facade.
moderatebrowserfe-perf-delivery
Why
Tag managers, chat widgets, video players and A/B testing tools often outweigh the site's own code, run long tasks during load and interaction, and change without your review. They are a common reason for poor INP and LCP.
Fix
List every third party with its owner and purpose; remove what nobody uses. Load the rest after the page is usable (async, defer, framework strategies, or on interaction). Replace embeds with a facade: a static preview image and a play or "load map" button that inserts the real iframe on click. Self-host small libraries instead of loading them from a CDN.
Examples
<!-- good: a video facade -->
<button type="button" class="video-facade" data-id="abc123">
<img src="/img/video-poster.webp" alt="" width="1280" height="720">
<span>Play video: setting up sync</span>
</button>Sources
Facts
- Id
perf/third-party-cost- Severity
- moderate
- Check
- browser needs a rendered page:
audit --url - Applies to
page- Same problem in
- Lighthouse
third-parties-insight - Taught by the skill
fe-perf-deliveryJavaScript, CSS and asset delivery- Since version
- 0.1.0
Read it in the terminal
npx github:dawidolko/frontend-skills explain perf/third-party-cost