Loading…
Defer or async non-critical scripts so they stop delaying the page from rendering.
A plain <script> in the <head> blocks HTML parsing until it downloads and executes. Adding defer (or async for independent scripts) lets the page render while scripts load.
defer to app scripts so they execute after HTML parsing, in order.async for analytics/widgets that don't depend on anything else.<script src="/app.js"></script> <!-- blocks parsing --><script src="/app.js" defer></script>
<script src="https://analytics.example/a.js" async></script>"Delay JavaScript Execution" in WP Rocket / Perfmatters defers third-party scripts until user interaction.
Use next/script with strategy="lazyOnload" or "afterInteractive" for third-party tags.
Run a free audit and get a prioritized fix list with auto-generated code.
Run a free audit