Performance
perf/third-party-async
Third-party scripts load with async or defer (or a framework strategy such as lazyOnload), never as parser-blocking tags.
moderatestaticfe-perf-delivery
Why
A plain <script src> stops HTML parsing until a server you do not control answers and the script runs. A slow chat widget or tag manager then delays everything after it, and an outage of that server can leave the page half-rendered.
Fix
Add async to independent tags (analytics, chat), defer when order matters, or load the script after an interaction. In frameworks use the loader: Next.js <Script strategy="afterInteractive"> or "lazyOnload", Nuxt useScript, Astro <script> processing. Ask whether the third party is needed on this page at all.
Examples
<!-- bad -->
<script src="https://widget.example-chat.com/loader.js"></script>
<!-- good -->
<script src="https://widget.example-chat.com/loader.js" async></script>Sources
Facts
- Id
perf/third-party-async- Severity
- moderate
- Check
- static checked in the source by
audit - Applies to
htmlvuesvelteastrojsx- 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-async