# Optimize Third-Party Script Loading

Reduce page load time and rendering delays by ensuring third-party scripts use async/defer attributes, lazy loading, or self-hosting where appropriate.

**Canonical URL:** https://skillshunter.net/skills/github-thedaviddias-front-end-checklist-skills-third-party-scripts-f9f7d309aa0a

**JSON URL:** https://skillshunter.net/api/public/v1/skills/github-thedaviddias-front-end-checklist-skills-third-party-scripts-f9f7d309aa0a

**Markdown URL:** https://skillshunter.net/skills/github-thedaviddias-front-end-checklist-skills-third-party-scripts-f9f7d309aa0a.md

**Instructions download URL:** https://skillshunter.net/skills/github-thedaviddias-front-end-checklist-skills-third-party-scripts-f9f7d309aa0a/download

**Category:** Software & Development

**Source URL:** https://github.com/thedaviddias/Front-End-Checklist/blob/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e/skills/third-party-scripts/SKILL.md

**Source commit:** e8d14d049010e2ce25afcd5e8609dfcbbe63e47e

**Listing approved at:** 2026-11-24

**Created at:** 2026-11-23T05:57:29.000000Z

**Updated at:** 2026-11-24T07:12:47.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes. Consider self-hosting critical scripts if necessary.

### When to use it

- Auditing slow page loads caused by third-party scripts
- Improving performance for websites with heavy assets or rendering delays
- Optimizing script loading for analytics, ads, and chat widgets

## Skill instructions

---
name: third-party-scripts
description: "Use when auditing slow page loads, heavy assets, or rendering delays related to Optimize third-party script loading. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes."
metadata:
  category: performance
  priority: high
  difficulty: intermediate
  estimatedTime: "20"
  source: frontendchecklist.io
  url: https://frontendchecklist.io/rules/performance/third-party-scripts
---

# Optimize third-party script loading

Third-party scripts are the #1 cause of slow websites—unoptimized loading can add 2-5 seconds to your page load time.

## Quick Reference

- Use async for independent scripts (analytics, ads)
- Use defer for DOM-dependent scripts (chat widgets, social)
- Lazy-load non-critical scripts after page load
- Consider self-hosting critical third-party scripts

## Check

Analyze third-party scripts on this page to ensure they use async/defer and don't block rendering.

## Fix

Add async or defer attributes to third-party scripts and consider lazy loading non-critical scripts.

## Explain

Explain the performance impact of third-party scripts and strategies to minimize their blocking effect.

## Code Review

Review the routes, assets, and loading behavior that affect Optimize third-party script loading. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.

---

For full implementation details, code examples, and framework-specific guidance,
see `references/rule.md`.

Rule page: https://frontendchecklist.io/rules/performance/third-party-scripts

