Official statement
Other statements from this video 8 ▾
- 3:39 La vitesse mobile à 2,4 secondes suffit-elle vraiment à optimiser vos conversions ?
- 7:19 La perception de vitesse compte-t-elle plus que les métriques Core Web Vitals ?
- 8:01 La vitesse perçue remplace-t-elle la vitesse réelle comme critère de ranking ?
- 25:30 Pourquoi la moitié de vos visiteurs mobiles disparaissent-ils avant même de charger votre page ?
- 35:40 Le CSS asynchrone améliore-t-il vraiment la perception de vitesse pour le SEO ?
- 38:57 Les polices Web bloquent-elles vraiment le rendu et tuent-elles vos Core Web Vitals ?
- 50:48 Les animations de chargement influencent-elles vraiment le référencement de votre site ?
- 57:30 Pourquoi l'UX des formulaires de réservation influence-t-elle directement le ranking de votre site ?
Google recommends using the async or defer attributes on <script> tags to prevent blocking the page rendering. The impact on perceived loading time for users and Core Web Vitals can be substantial, especially on mobile. However, be cautious: not all scripts are suitable for deferred loading, and poor implementation can ruin the user experience.
What you need to understand
Why does Google place such a strong emphasis on asynchronous loading?
The browser, when it encounters a classic <script> tag, halts everything. It downloads the JavaScript file, executes it, and only then resumes HTML parsing. This behavior blocks the rendering of the page: the user sees a blank screen for longer, Core Web Vitals (FCP, LCP) drop, and the experience declines.
The async and defer attributes break this blockage. With defer, the browser downloads the script in parallel with HTML parsing and executes it only once the DOM is complete. With async, the download is also parallel, but execution happens as soon as the file is ready, without waiting for the parsing to finish. Google's statement aims to reduce the main thread blocking time, a key metric for mobile ranking.
What is the practical difference between async and defer?
Defer ensures an execution order: if you have three scripts with defer, they execute in the order they appear in the HTML. This is ideal for scripts that are interdependent (a library and then a plugin using it). Execution occurs just before the DOMContentLoaded event is triggered.
Async, on the other hand, guarantees no specific order. The first downloaded script executes first. Use it for completely independent scripts: analytics, ad pixels, social widgets. If you have file dependencies, async can intermittently break your code, depending on network conditions.
Does this recommendation apply to all scripts?
No. Critical scripts for initial rendering (those that modify the visible DOM above the fold, or inject critical CSS) should not be deferred. Otherwise, you risk a flash of unstyled content or elements appearing out of sync.
Similarly, scripts that initialize interactive components needed immediately (dropdown menus, hero carousels) face issues with async/defer. The user may click on an element before the JavaScript loads, causing immediate frustration. Google never details these nuances in its official communications.
- Defer: scripts with dependencies, execution after complete HTML parsing, guaranteed order
- Async: independent scripts, execution upon download, non-guaranteed order
- Critical scripts for initial rendering: keep them blocking or inline
- Measurable impact on FCP, LCP, TBT (Total Blocking Time)
- Google PageSpeed Insights flags blocking scripts as an optimization opportunity
SEO Expert opinion
Does this statement align with field observations?
Yes, overall. The audits I conduct consistently show a gain of 0.5 to 1.5 seconds on LCP after migrating to defer on non-critical scripts. E-commerce sites with significant third-party tracking (Facebook Pixel, Google Ads, Hotjar) experience a drop in TBT (Total Blocking Time) of 40 to 60% by changing these scripts to async.
The problem is that Google never specifies which ones to defer. In practice, 80% of websites load at least one script that breaks the interface if deferred. I have seen entire navigation menus disappear, sliders freeze, and GDPR consent pop-ups fail to display. [To be verified]: Google does not provide any methodology for automatically identifying critical vs. non-critical scripts.
What nuances should be considered regarding this recommendation?
Firstly, the order of operations matters. If you place defer on jQuery and then on a jQuery plugin, it works. Conversely, it's disastrous. With async, the same issue arises but is unpredictable: it might work in development but fail in production depending on network latency.
Furthermore, modern frameworks (React, Vue, Angular) already use native code-splitting and lazy-loading. Adding async/defer to bundles generated by Webpack or Vite can create timing conflicts. I recommend testing in a staging environment with 3G network throttling before deploying to production.
In what situations does this rule not apply?
Inline scripts (JavaScript code directly in the HTML) cannot receive async or defer. If you have critical inline code, your only option is to minimize it or move it to the end of <body>.
ES6 modules (<script type="module">) already behave like defer by default. Adding the defer attribute is redundant. If you use modules, the async attribute remains relevant for completely independent scripts.
Practical impact and recommendations
What practical steps should be taken to implement async and defer?
Start with an audit of your scripts. Open Chrome DevTools, navigate to the Performance tab, and record the page loading. Look at the waterfall: all scripts that block the main thread for more than 50 ms are candidates. For each script, ask: does the page function if this script runs after the initial rendering?
For tracking scripts (Google Analytics, Facebook Pixel, Hotjar, etc.), use async without hesitation. For libraries with dependencies (jQuery + plugins, Bootstrap JS, etc.), switch to defer while maintaining the order of insertion in the HTML. Then test on mobile with 3G throttling: this is where LCP gains are most visible.
What mistakes should be avoided during the migration?
Never place defer or async on scripts that modify critical DOM elements above the fold. I have seen an e-commerce site lose 20% of conversions in a week because the "Add to Cart" button no longer worked: the script was deferred, the user clicked before execution, and nothing happened.
Avoid mixing async and defer on dependent scripts. If script A must run before script B, use defer on both in the correct order. With async, the order is unpredictable. Be wary of third-party scripts that inject other scripts: some ad pixels load dozens of sub-resources, and async can create race conditions.
How can you verify that the implementation is working correctly?
Use Google PageSpeed Insights and WebPageTest to measure FCP, LCP, and TBT before and after. A gain of 0.5 seconds on LCP is significant. Also, test manually: click on all interactive elements as soon as the page appears. If something does not respond, then you deferred a critical script.
Implement RUM monitoring (Real User Monitoring) to catch JavaScript errors in production. Tools like Sentry or LogRocket alert you if scripts do not load in the correct order. Finally, check that your Core Web Vitals in Search Console improve after deployment. If nothing changes after 28 days, there’s a problem elsewhere.
- Audit scripts with Chrome DevTools (Performance tab)
- Switch tracking scripts to async
- Switch libraries with dependencies to defer (in order)
- Test on mobile with 3G throttling
- Monitor JavaScript errors in production
- Measure FCP, LCP, TBT before and after with PageSpeed Insights
❓ Frequently Asked Questions
Faut-il utiliser async ou defer sur tous les scripts JavaScript ?
Quelle est la différence entre async et defer ?
Est-ce que async ou defer améliore vraiment le SEO ?
Peut-on mettre defer sur jQuery et ses plugins ?
Comment tester si mes scripts différés ne cassent pas la page ?
🎥 From the same video 8
Other SEO insights extracted from this same Google Search Central video · duration 1h01 · published on 25/01/2018
🎥 Watch the full video on YouTube →
💬 Comments (0)
Be the first to comment.