Performance Q&As Logo
Performance Q&As Part of the Q&A Network
Q&A Logo

How do I improve fid by deferring non-critical async-js?

Asked on Sep 19, 2025

Answer

Improving First Input Delay (FID) involves ensuring that the main thread is free to respond to user interactions quickly. Deferring non-critical JavaScript can help by allowing the browser to prioritize essential scripts and user actions.
<!-- BEGIN COPY / PASTE -->
    <script src="non-critical.js" async defer></script>
    <!-- END COPY / PASTE -->
Additional Comment:
  • Use "async" for scripts that can be executed as soon as they are downloaded, without blocking HTML parsing.
  • Combine "async" with "defer" for non-critical scripts to ensure they execute after the document has been parsed.
  • Identify and separate critical from non-critical scripts to optimize load order and improve FID.
  • Consider using "defer" alone for scripts that need to maintain execution order.
✅ Answered with Core Web Vitals best practices.

← Back to All Questions
The Q&A Network