---
title: "Render-blocking <script> (perf/sync-script)"
description: "A <script src> without async or defer stops HTML parsing until it downloads and runs (Lighthouse: eliminate render-blocking resources)."
url: http://localhost:4173/rules/perf/sync-script
updated: 2026-11-11
---

# Render-blocking <script>

> `perf/sync-script` is a vetd rule. It flags: Render-blocking <script>. It runs on every `check`, together with the TypeScript check.

| Fact | Value |
| --- | --- |
| Rule id | `perf/sync-script` |
| Severity | warning |
| Group | Performance: fonts, images, scripts and bundle |
| Tags | performance, lighthouse |

## Why it matters

A <script src> without async or defer stops HTML parsing until it downloads and runs (Lighthouse: eliminate render-blocking resources).

## How to fix it

Use next/script (afterInteractive or lazyOnload), or add defer.

## Credit

Based on work by:

- [Google Chrome](https://developer.chrome.com/docs/lighthouse/overview): Lighthouse flags synchronous scripts and stylesheets that block first paint, and recommends async or defer.

## References

- [Eliminate render-blocking resources](https://developer.chrome.com/docs/lighthouse/performance/render-blocking-resources), Chrome for Developers
- [<script> HTML script element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script), MDN Web Docs
- [Efficiently load third-party JavaScript](https://web.dev/articles/efficiently-load-third-party-javascript), web.dev

## See it

Demos in the vetd Lab:

- [defer or async every script](http://localhost:4173/lab/react-perf/never-block-the-parser-with-scripts)

## Related rules

- [`perf/script-strategy`](http://localhost:4173/rules/perf/script-strategy.md)
- [`bp/document-write`](http://localhost:4173/rules/bp/document-write.md)

## Get this text from vetd

MCP: call `explain` with `{ "diagnosticId": "perf/sync-script" }`. CLI: `npx vetd explain perf/sync-script`.

---

[All 92 rules](http://localhost:4173/rules.md) · Previous: [`perf/image-priority`](http://localhost:4173/rules/perf/image-priority.md) · Next: [`perf/script-strategy`](http://localhost:4173/rules/perf/script-strategy.md)
