Ressources qui bloquent le rendu
Ce que ressources qui bloquent le rendu are, how CSS and synchronous JavaScript delay the critical rendering chemin, pourquoi que hurts Core Web Vitals (and indirectly SEO), how to trouver les, and Comment corriger les with async, defer, critical CSS, and media requêtes.
Langues
Ressources qui bloquent le rendu are CSS and synchronous JavaScript fichiers a navigateur doit download and traiter avant it peut paint anything. An applicable stylesheet in the head is render-blocking by par défaut; a <script> in the head sans async or defer is parser-blocking by par défaut (a connexe but formally distinct mechanism from the HTML spec's explicit blocking="render" attribute). async loads in parallel and runs quand ready (unordered); defer loads in parallel and runs après parsing, in order; module scripts defer by par défaut. Ils peut delay Premier affichage de contenu and Plus grand affichage de contenu, and LCP is utilisé by Google's Core Web Vitals ranking systems — a tiebreaker, pas a documented dominant ranking factor. Tout eligible 200-status pages enter Google's rendering queue regardless of si JavaScript is présent; Google récupère at la plupart 2 MB per non-PDF URL (notamment headers), separately pour chaque referenced fichier, qui is a récupérer limite, pas a render-blocking-specific penalty. Trouver les with the current Lighthouse 13 'Render blocking requêtes' Insight and the Chrome DevTools Coverage tab; fix by deferring non-critical JS, inlining seulement critical CSS où a trace montre it's the bottleneck, and en utilisant media attributes pour conditional stylesheets — alors re-test on a repeated trace.
Evidence for this claim Stylesheets participate in the critical rendering path and can block first render until CSS is processed. Scope: Current official or standards documentation. Confidence: high · Verified: web.dev: Critical rendering path Evidence for this claim Classic scripts without async or defer can block HTML parsing while fetched and executed. Scope: Current official or standards documentation. Confidence: high · Verified: MDN: script elementTL;DR — Ressources qui bloquent le rendu are CSS and JavaScript fichiers votre navigateur has to download and run avant it peut montrer anything on screen. A blank white page pendant que ceux fichiers charger is the symptom. CSS blocks by par défaut; a
<script>in the<head>sansasyncordeferaussi blocks. The fix is to charger the non-essential stuff plus tard so lune page peut paint sooner.
Ce que “render-blocking” signifie
Quand someone opens votre page, le navigateur reads the HTML from top to bottom. Along the façon it hits fichiers it nécessite to draw lune page — mostly CSS stylesheets and JavaScript. Some of ceux fichiers faire le navigateur arrêter and wait: it won’t paint a unique pixel jusqu’à they’re downloaded and processed. Ceux are ressources qui bloquent le rendu.
That’s pourquoi a slow page souvent montre a blank white screen premier, alors everything apparaît at une fois. Le navigateur had the HTML, but it was waiting on a stylesheet or a script avant it voudrait draw anything.
The two kinds
- CSS is render-blocking by par défaut quand le navigateur discovers a
<link rel="stylesheet">in the<head>pendant que parsing and the stylesheet en réalité s’applique (aucun non-matchingmedia, aucundisabled). Le navigateur doesn’t vouloir to montrer vous unstyled content and alors re-style it (que flash semble broken), so it waits pour applicable CSS avant painting. - JavaScript pauses HTML parsing quand it’s a plain
<script>in the<head>sansasyncordefer— le navigateur has to arrêter reading the HTML, go récupérer the script, run it, and seulement alors continuer. (Technically ce is “parser-blocking”; si it aussi formally counts as “render-blocking” dépend on navigateur internals la plupart readers don’t besoin — voir Avancé.)
Pourquoi c’est important
The plus long le navigateur waits, the plus long votre visitor stares at nothing. Google measures quand utile content apparaît (a metric appelé Largest Contentful Paint), and that’s partie of Core Web Vitals — a petit ranking signal. So ressources qui bloquent le rendu peut hurt les deux votre visitors’ experience and, indirectly, votre SEO.
The simple fixes
- Ajouter
deferto scripts so ils download alongside lune page and run après it’s drawn. - Don’t put plus CSS or JavaScript in the
<head>que the premier screen en réalité nécessite. - Si you’re on WordPress, plugins comme WP Rocket or Autoptimize do ce pour vous with a checkbox.
Vouloir the mechanics — async vs defer, critical CSS, the crawl-budget angle, and
ce que Google en réalité dit? Switch to the Avancé tab.
Evidence for this claim Stylesheets participate in the critical rendering path and can block first render until CSS is processed. Scope: Current official or standards documentation. Confidence: high · Verified: web.dev: Critical rendering path Evidence for this claim Classic scripts without async or defer can block HTML parsing while fetched and executed. Scope: Current official or standards documentation. Confidence: high · Verified: MDN: script elementTL;DR — Ressources qui bloquent le rendu delay une page’s premier paint. An applicable CSS stylesheet in the
<head>blocks by par défaut (non-matchingmedia,disabled, or dynamic insertion with aucun explicitblocking="render"don’t). A parser-inserted classic<script>sansasync/deferis parser-blocking by par défaut — pausing HTML parsing — qui is a connexe but distinct mechanism from the formal “render-blocking” attribute model.asyncloads in parallel and executes quand downloaded (unordered, peut interrupt parsing);deferloads in parallel and executes après the HTML is parsed (in order); module scripts defer by par défaut. Ces delays peut push back FCP and LCP, and LCP is utilisé by Google’s ranking systems — but it’s a tiebreaker, pas a dominant factor, and Google documents aucun direct render-blocking ranking weight. Google récupère at la plupart 2 MB per non-PDF URL (notamment headers), separately pour chaque referenced JS/CSS fichier — a truncation boundary, pas a render-blocking-specific penalty — and tout eligible 200-status pages enter Google’s rendering queue si or pas ils utiliser JavaScript. Trouver blockers with the current Lighthouse 13 “Render-blocking requêtes” Insight and the DevTools Coverage tab; fix withdefer, critical CSS seulement où a trace montre it’s the bottleneck,mediaattributes, and removing unused code — alors re-test with a repeated, matched trace.
The critical rendering chemin
To draw une page, a navigateur runs a fixed sequence: parse the HTML into the DOM, parse the CSS into the CSSOM, combine les into a render tree, lay it out, and paint. Que sequence is the critical rendering chemin, and anything que stalls it delays the premier pixel. As Google’s Ilya Grigorik framed it, “optimizing the critical rendering chemin refers to prioritizing the afficher of content que relates to the current utilisateur action.” Ressources qui bloquent le rendu are the choses sitting in que chemin with leur hand up, making le navigateur wait.
CSS is render-blocking by par défaut — quand it’s applicable
Le navigateur ne va pas paint styled content jusqu’à it has the CSSOM construit from every
applicable blocking stylesheet, and MDN’s <link> référence is explicit à propos de the
scope: “seulement link elements in the document’s <head> peut possibly block
rendering. By par défaut, a link element with rel="stylesheet" in the <head>
blocks rendering quand le navigateur discovers it during parsing.” From web.dev’s
Optimize LCP guide: “Style sheets chargé from the HTML markup va block
rendering of tout content que follows les.” Ce is intentional — painting
unstyled HTML premier and re-styling it produces an ugly flash — but “by default”
has réel edges:
- A stylesheet with a non-matching
mediaattribute (e.g.media="print"on a screen visit) is récupéré but doesn’t block. - A stylesheet with
disableddéfinir isn’t chargé or applied jusqu’à vous clair the attribute. - A stylesheet ajouté dynamically via script isn’t render-blocking unless vous aussi
définir
blocking="render"on it explicitly — dynamic insertion opts out of the par défaut.
Dans its applicable scope, a bloated blocking stylesheet peut encore hold the whole page hostage: quand it takes plus long to charger que votre LCP image itself, the LCP element can’t render même après its propre resource has finished downloading.
Scripts: parser-blocking by par défaut, formally render-blocking on requête
A parser-inserted classic <script> in the <head> sans async or defer is
parser-blocking by par défaut: le navigateur arrête building the DOM, récupère the
script, executes it, and seulement alors resumes. Google’s legacy PageSpeed docs spell out
the cost: “whenever the parser encounters a script it has to arrêter and execute it
avant it peut continuer parsing the HTML. In the cas of an external script the
parser is aussi forced to wait pour the resource to download, qui may incur un or
plus network roundtrips and delay the temps to premier render of lune page.” As the
Optimize LCP guide puts it bluntly, “it is almost jamais necessary to ajouter
synchronous scripts… to the <head> of votre pages.”
Worth being precise ici: parser-blocking and the HTML spec’s formal
render-blocking attribute model are connexe but distinct mechanisms. Per MDN’s
<script> référence, the blocking="render" token “explicitly indicates que
certain operations devrait be blocked jusqu’à the script has executed,” and “seulement
script elements in the document’s <head> peut possibly block rendering” ce
façon — “si tel a script element is ajouté dynamically via script, vous doit définir
blocking = "render" pour it to block rendering.” En pratique, a par défaut
parser-blocking <head> script déjà stalls the pipeline suffisant que the
distinction rarely changements ce que vous do à propos de it; it matters mainly pour dynamically
inserted scripts, qui besoin the explicit attribute to participate, and navigateur
prise en charge pour blocking="render" is encore limited and worth checking avant vous rely
on it.
Un plus par défaut worth knowing: type="module" scripts defer by par défaut (aucun
defer attribute nécessaire) unless async is ajouté to modifier que scheduling.
async vs defer — ils ne sont pas the même
Ce is the unique la plupart utile distinction pour fixing render-blocking JS. Les deux download the script in parallel with HTML parsing, so neither is parser-blocking during download. Ils differ in execution:
async— executes immédiatement quand the download finishes, qui peut interrupt parsing, and runs in aucun guaranteed order. Bon pour truly independent third-party scripts (analytics, ads) que don’t touch votre DOM or depend on chaque autre.defer— executes après the HTML is entièrement parsed, in document order. Bon pour scripts que depend on the DOM or on chaque autre (la plupart of votre propre code).- Module scripts (
type="module") — deferred by par défaut; ajouterasyncsi vous specifically vouloir module-ready-order execution à la place.
Si vous remember un rule: defer pour anything ordered or DOM-dependent, async
seulement pour fire-and-forget third-party scripts.
How ce affecte SEO
The chain is réel but has réel boundaries. Don’t overstate it in soit direction:
- Ressources qui bloquent le rendu delay Premier affichage de contenu — quand quelconque content premier apparaît.
- Ils peut delay Plus grand affichage de contenu — Google’s principal chargement metric — though a flagged resource isn’t proof it’s the dominant field bottleneck, and removing it doesn’t guarantee a meilleur LCP; the Lighthouse Insight reports a potential delay from un observed trace, pas a guaranteed field effect.
- LCP is a Core Web Vitals metric, mesuré at the 75th percentile of réel field données over 28 days, and Google dit Core Web Vitals “are utilisé by our ranking systems.” The “bon” LCP threshold is ≤2,5 s.
- Google’s page-experience documentation doesn’t define a direct render-blocking ranking weight, chain, or tiebreaker, and donne aucun ranking guarantee from removing blockers — it dit relevance encore wins, but “having a great page experience peut contribute to success in Search” quand there’s lots of similarly utile content to choisir from.
Garder the weighting honest. Martin Splitt’s line is the correct calibration: “a fast website is a little plus utile que a slow website,” but “content is encore the king.” Fixing a resource that’s genuinely delaying votre LCP is worth doing pour UX and as un input among nombreux Google’s systems weigh — it’s pas a lever with a documented, dedicated ranking multiplier.
The crawl-efficiency angle — corrected
I previously framed heavy render-blocking JavaScript as something que “pushes” or “forces” pages into Google’s rendering queue. That’s pas accurate, and it’s worth correcting plainly: Google’s current JavaScript SEO documentation states que “tout pages with a 200 Code d’état HTTP are sent to the rendering queue, aucun matter si JavaScript is présent on lune page.” Every eligible page goes via que queue — ressources qui bloquent le rendu don’t créer a special on-ramp into it.
Evidence for this claim Google's current guidance says all eligible pages returning HTTP 200 enter its rendering queue regardless of whether JavaScript is present, so render-blocking JavaScript should not be claimed to force a page into that queue. Scope: crawling, rendering, indexing Confidence: high · Verified: Understand the JavaScript SEO basicsCe que the resource type fait modifier is how beaucoup fonctionner se produit une fois une page reaches rendering. Onely’s experiment trouvé Google nécessaire 9× plus long to entièrement explorer JavaScript-rendered pages que identical HTML pages (313 hours vs. 36 hours) in leur tester setup, parce que “pages que exiger rendering have to wait in a rendering queue en outre to the explorer queue qui s’applique to tout pages.” Treat que as evidence que content requiring rendu côté client carries a réel time-to-index cost in que study — pas as proof que a spécifique render-blocking CSS or JS fichier is ce que triggers queueing.
On fichier size: Google’s exploration documentation describes a 2 MB récupérer limite per
non-PDF URL, notamment HTTP headers, applied separately to chaque individual
resource it requêtes — so a grand <head> script or stylesheet obtient its propre 2 MB
counter, pas a shared budget with the HTML. That’s a récupérer/truncation boundary,
pas a “processing limit,” and Google doesn’t document a special explorer or indexation
penalty tied specifically to ressources qui bloquent le rendu au-delà que general
truncation risk.
Worth debunking pendant que we’re ici: Google’s renderer has aucun fixed timeout. As I’ve documented in my JavaScript SEO guide, “là is aucun fixed timeout pour the renderer. It runs with a sped-up timer to voir si anything is ajouté at a plus tard temps.” The concern isn’t a 5-second cutoff — it’s the queueing delay avant rendering même begins.
Ce même reaches AI robots d’exploration now. Gary Illyes argued in 2026 que “si sites utilisé relatively bon HTML and aucun JavaScript (or SSR), les deux base model training, and web and agentic RAG voudrait be a piece of cake from raw données processing perspective.” Heavy client-side JS is a problem bien au-delà Googlebot.
How to trouver les
- Chrome DevTools Performances panel / Lighthouse 13 — the current “Render
blocking requêtes” Insight (qui, as of Lighthouse 13, is où the older
“Eliminate render-blocking resources” audit déplacé) flags scripts in the
<head>manquantasync/deferand stylesheets sans adisabledor non-matchingmediaattribute, and estimates the ms you’d enregistrer from un observed trace. Connor Clark’s write-up puts it plainly: “render-blocking requêtes are network requêtes que prevent une page’s initial render, potentially delaying Largest Contentful Paint.” Si you’re reading older PageSpeed Insights output que encore dit “Eliminate render-blocking resources,” it’s the même underlying signal sous the pre-Lighthouse-13 nom. - Chrome DevTools Coverage tab — marks bytes green (critical — utilisé pour premier paint) or red (unused at premier paint). Lots of red CSS/JS is votre candidate liste.
- WebPageTest waterfall — regarder at everything avant the Commencer Render line.
- Run it plus que une fois — a unique trace reflects que run’s consent-manager state, third-party tag charger, cache state, and CSP behavior. Repeat the trace (cold and warm) avant treating un flagged resource as a fixed fact.
An illustrative navigation contains HTML from 0 to 180 milliseconds, blocking CSS from 120 to 420 milliseconds, synchronous JavaScript from 210 to 610 milliseconds, a non-blocking analytics request from 250 to 500 milliseconds, and font loading from 420 to 610 milliseconds. First paint occurs at 610 milliseconds. The example explains timing mechanics; it is not a live trace.
Comment corriger les
JavaScript
defernon-critical scripts —<script src="app.js" defer></script>. Parallel download, ordered execution après parse. The safe par défaut pour votre propre JS.asyncpour independent third-party scripts —<script src="analytics.js" async></script>. Seulement quand order and DOM-readiness genuinely don’t matter.- Déplacer scripts to the fin of
<body>— the older fallback quand vous pouvez’t ajouter attributes; the parser reaches les dernier.
CSS — as conditional decisions, pas blanket patterns
- Inline critical CSS seulement quand a trace montre CSS is the réel bottleneck —
extract the styles nécessaire pour above-the-fold content into an inline
<style>block so premier paint nécessite aucun round-trip. Google’s propre caution s’applique: “inlining CSS is an avancé performances technique que peut améliorer performances, but peut aussi lead to bugs si pas implemented correctement.” Inline seulement the critical subset, nom an owner pour regenerating it quand templates modifier, and vérifier pour drift à travers page states — a critical-CSS snapshot que goes stale silently reintroduces flashes of unstyled content or manquant styles. - Defer the rest, matching la requête exactly — charger the complet stylesheet with
the
<link rel="preload" as="style" onload="this.rel='stylesheet'">pattern. A preload seulement obtient reused pour the eventual requête si l’URL,as,type, andcrossorigin/CORS mode match — a mismatched hint causes le navigateur to récupérer the resource twice au lieu de skipping the round-trip. mediaattributes —media="print"ormedia="(min-width: 900px)"lets the navigateur download a stylesheet sans blocking render quand the requête doesn’t match.- Supprimer unused CSS and minify — moins to block on, faster downloads.
- Vérifier avant shipping — re-check pour duplicate/unused récupère, FOUC, and nouveau layout shift après quelconque critical-CSS or preload modifier, on a repeated trace, pas a unique lucky run.
Platform-specific (WordPress) — WP Rocket (delay/defer JS, optimize CSS delivery),
Autoptimize (async/defer JS, inline critical CSS), and Async JavaScript implement tout
of the ci-dessus via plugin UI. They’re applying the même async/defer/critical-CSS
techniques — knowing ce que chaque setting fait is how vous éviter breaking votre theme.
Connexe reading on ce site
- Core Web Vitals — the parent metric définir ce rolls up into.
- Plus grand affichage de contenu — the metric ressources qui bloquent le rendu hit hardest.
- Premier affichage de contenu — the premier chose ils delay.
- Total Blocking Temps — the main-thread cost of heavy JS.
- PageSpeed Insights — the outil que surfaces the audit.
- Rendering and Budget d’exploration — the explorer/render queue angle.
AI summary
A condensed prendre on the Avancé version:
- Ressources qui bloquent le rendu are CSS and synchronous JavaScript on the critical
rendering chemin. An applicable stylesheet (
<head>, matchingmedia, pasdisabled, pas dynamically inserted) is render-blocking by par défaut; a parser-inserted<script>sansasync/deferis parser-blocking by par défaut, qui is connexe to but formally distinct from the HTML spec’sblocking="render"attribute (head-only; requis pour dynamically inserted scripts/stylesheets). async= parallel download, executes quand ready, unordered, peut interrupt parsing — utiliser pour independent third-party scripts.defer= parallel download, executes après parse, in order — utiliser pour votre propre/DOM-dependent code. Module scripts (type="module") defer by par défaut.- SEO chain: ils peut delay FCP and LCP (a flagged resource isn’t proof it’s the dominant bottleneck); LCP is utilisé by Google’s Core Web Vitals ranking systems (bon ≤2,5 s). Google documents aucun direct render-blocking ranking weight or guarantee — “a fast website is a little plus utile… content is encore the king.”
- Explorer angle, corrected: tout eligible 200-status pages enter Google’s rendering queue regardless of JavaScript presence — ressources qui bloquent le rendu don’t créer a special queue on-ramp. Google récupère at la plupart 2 MB per non-PDF URL (notamment headers), per resource — a récupérer/truncation boundary, pas a render-blocking-specific processing penalty. Onely’s study trouvé Google took 9× plus long to entièrement explorer JS-rendered pages que HTML in leur tester — evidence of a rendering-step cost, pas proof a spécifique blocker triggers queueing. Aucun fixed renderer timeout — the cost is queueing, pas a cutoff.
- Trouver: Lighthouse 13’s “Render blocking requests” Insight (formerly “Eliminate ressources qui bloquent le rendu”); DevTools Coverage tab (green = critical, red = unused); WebPageTest waterfall avant Commencer Render. Repeat the trace — consent, third-party, and cache state peut modifier results run to run.
- Fix:
defernon-critical JS,asyncindependent third-party JS; inline critical CSS seulement où a trace montre it’s the bottleneck (with an owner pour keeping it in sync) and defer the rest, matching preload’sas/type/crossoriginexactly;mediaattributes pour conditional stylesheets; supprimer unused CSS and minify; vérifier with a repeated, matched trace avant shipping.
Documentation officielle
Primary-source guidance from Google and Bing.
Google / Chrome
- Render blocking requêtes (Chrome DevTools Performances Insights) — the current authoritative explainer (Connor Clark, Oct 2025), and the Lighthouse 13 Insight ce topic now lives sous: defer, inline, reduce payload.
- Eliminate ressources qui bloquent le rendu (legacy Lighthouse audit) — encore live but carries a banner que it déplacé into the Insight ci-dessus as of Lighthouse 13; kept ici pour readers on older reports.
- Optimize Plus grand affichage de contenu — how render-blocking CSS and synchronous scripts delay LCP (Philip Walton & Barry Pollard).
- Critical rendering chemin — the underlying parse → CSSOM → render-tree → paint sequence (Ilya Grigorik).
- Supprimer render-blocking JavaScript (legacy PageSpeed docs) — deprecated PSI v4, but the parser-blocking mechanics are encore accurate.
- Core Web Vitals & Recherche Google — LCP thresholds and how CWV relate to ranking.
- Comprendre the JavaScript SEO basics — confirms tout eligible 200-status pages enter the rendering queue regardless of JavaScript presence.
- Understanding page experience dans la recherche Google results — the current, bounded language on how Core Web Vitals relate to ranking (aucun direct render-blocking weight documented).
HTML / navigateur spec (mechanics)
<script>: The Script element (MDN) —async/defersemantics, module default-defer, and theblocking="render"attribute (head-only; requis pour dynamically inserted scripts).<link>: The External Resource Lien element (MDN) — stylesheetmedia/disabledbehavior, theblockingattribute, and preload’sas/type/crossoriginrequest-matching requirements.- HTML Standard — the script element (WHATWG) — the formal parser-blocking and render-blocking definitions ce article’s script section is fondé on.
Bing / Microsoft
- bingbot Series: JavaScript, Dynamic Rendering, and Cloaking — pourquoi JS at scale is hard pour Bingbot, and dynamic rendering as an acceptable workaround (Fabrice Canel & Frédéric Dubut).
- Bing Webmaster Guidelines — vitesse de page as a ranking factor; minimizing render-blocking JavaScript.
Quotes from the source
On-the-record statements. Chaque lien deep-links to the quoted passage où the source page permet it.
Google / Chrome — the mechanics
- “The goal is to reduce the impact of these render-blocking URLs by inlining critical resources, deferring non-critical resources, and removing anything unused.” — Chrome Lighthouse docs. Jump to quote
- “Render-blocking requests are network requests that prevent a page’s initial render, potentially delaying Largest Contentful Paint (LCP).” — Connor Clark, Chrome DevTools Performances Insights. Jump to quote
- “Style sheets loaded from the HTML markup will block rendering of all content that follows them.” — web.dev, Optimize LCP (Philip Walton & Barry Pollard). Jump to quote
- “It is almost never necessary to add synchronous scripts (scripts without the async or defer attributes) to the head of your pages.” — web.dev, Optimize LCP. Jump to quote
- “Optimizing the critical rendering path refers to prioritizing the display of content that relates to the current user action.” — Ilya Grigorik, web.dev, Critical rendering chemin. Jump to quote
- “Avoid and minimize the use of blocking JavaScript, especially external scripts that must be fetched before they can be executed.” — Google PageSpeed Insights docs (legacy). Jump to quote
- “All pages with a 200 HTTP status code are sent to the rendering queue, no matter whether JavaScript is present on the page.” — Google, Comprendre the JavaScript SEO basics.
- “Only
scriptelements in the document’s<head>can possibly block rendering” and, pour dynamic insertion, “you must setblocking = "render"for it to block rendering.” — MDN,<script>: The Script element.
Bing / Microsoft
- “It is difficult for bingbot to process JavaScript at scale on every page of every website, while minimizing the number of HTTP requests.” — Fabrice Canel & Frédéric Dubut, Microsoft Bing. Jump to quote
Industry research — the crawl-queue cost
- “Pages that require rendering have to wait in a rendering queue in addition to the crawl queue which applies to all pages.” — Ziemek Bućko, Onely (Google nécessaire 9× plus long to explorer JS que HTML). Jump to quote
- “You can do this by deferring the loading of non-critical CSS and JavaScript files needed for ‘below the fold’ content until later.” — Joshua Hardwick, Ahrefs. Jump to quote
Render-blocking fix checklist
Fonctionner top to bottom — diagnose premier, alors fix the highest-savings items.
- Run PageSpeed Insights / Lighthouse and ouvrir the current “Render blocking requêtes” Insight (Lighthouse 13; older reports may encore étiquette it “Eliminate render-blocking resources”); remarque the estimated ms savings per resource as a lead, pas a guarantee.
- Ouvrir the DevTools Coverage tab and reload — flag stylesheets/scripts que are mostly red (unused at premier paint).
- Ajouter
deferto every non-critical<script>que dépend on the DOM or on autre scripts. - Utiliser
asyncseulement pour genuinely independent third-party scripts (analytics, ads) — jamais pour ordered or DOM-dependent code. - Confirmer aucun synchronous
<script>sits in the<head>sansasync/defer. - Inline seulement the critical (above-the-fold) CSS; charger the rest with the
preload+onloadpattern — don’t inline everything. - Ajouter
mediaattributes to conditional stylesheets (print, breakpoint requêtes) so ils download sans blocking. - Supprimer unused CSS and minify tout CSS/JS to shrink download temps.
- Garder individual JS/CSS fichiers bien sous Google’s 2 MB per-URL récupérer limite (inclut HTTP headers; it’s a truncation boundary, pas a render-blocking penalty, but a truncated fichier peut encore break behind the scenes).
- Re-test on a repeated, matched trace (cache/consent/third-party state peut shift results) and vérifier field LCP — aim to land LCP ≤2,5 s at the 75th percentile.
- Sanity-check lune page visually après CSS inlining — it’s the step la plupart probable to introduce bugs.
Render-blocking cheat sheet
async vs defer vs plain <script>
| Attribute | Blocks the parser? | Download | Execution order | Utiliser pour |
|---|---|---|---|---|
none (sync <script>) | Yes | Pauses parsing to récupérer | Immédiatement, blocks render | Almost jamais in <head> |
async | Aucun (during download) | Parallel | Quand ready — unordered, peut interrupt parse | Independent third-party scripts (analytics, ads) |
defer | Aucun | Parallel | Après HTML parsed — in document order | Votre propre / DOM-dependent code |
Is ce resource render-blocking?
| Resource | Render-blocking? | How to un-block it |
|---|---|---|
<link rel="stylesheet"> in <head>, applicable | Yes (par défaut) | Non-matching media, disabled, or preload+onload |
<link media="print"> (on a screen visit) | Aucun | (déjà non-blocking) |
| Stylesheet inserted dynamically via script | Aucun, unless blocking="render" définir | Ajouter blocking="render" seulement si vous specifically besoin it to block |
Sync <script> in <head> (aucun async/defer) | Parser-blocking by par défaut | Ajouter defer (or async si independent) |
<script defer> / <script async> / <script type="module"> | Aucun | — |
| Inline critical CSS | Aucun | (that’s the point — garder it petit) |
Fast facts
- LCP “good” threshold: ≤ 2,5 s at the 75th percentile of field données (28-day window).
- Google récupère at la plupart 2 MB per non-PDF URL (notamment headers), counted separately pour chaque referenced JS/CSS fichier — a récupérer/truncation boundary, pas a documented render-blocking-specific penalty.
- Tout eligible 200-status pages enter Google’s rendering queue regardless of si JavaScript is présent — ressources qui bloquent le rendu don’t créer a special queue on-ramp.
- Google’s renderer has aucun fixed timeout — the cost is the rendering queue, pas a cutoff.
- Lighthouse 13’s “Render blocking requests” Insight (formerly the “Eliminate
ressources qui bloquent le rendu” audit) flags head scripts manquant
async/defer, and stylesheets sansdisabled/ non-matchingmedia, from un observed trace — re-test to confirmer. - DevTools Coverage: green = critical, red = unused at premier paint.
- Inlining CSS is avancé — inline seulement the critical subset où a trace montre it’s the bottleneck; inlining tout of it kills mise en cache and causes bugs.
- Preload seulement obtient reused si
as/type/crossoriginmatch the eventual requête — a mismatch causes a duplicate récupérer.
Diagnose render-blocking problems by symptom
Lune page stays blank avant appearing tout at une fois
Probable causer: a stylesheet or synchronous head script is holding the premier paint. Fix: inspect the document’s early requête chain, alors defer non-critical JavaScript and split or reduce non-critical CSS. Confirmer: a nouveau trace paints utile content avant ceux non-critical fichiers finish.
defer did pas améliorer the premier paint
Probable causer: CSS or un autre synchronous script is encore the critical blocker, or the deferred script was pas the bottleneck. Fix: comparer the avant/après requête chain and main-thread activity plutôt que assuming every script blocks rendering. Confirmer: the remaining critical chemin identifies the suivant resource que gates paint.
Lune page flashes unstyled après deferring CSS
Probable causer: styles nécessaire pour the initial viewport were déplacé out of the critical chemin. Fix: garder truly critical CSS disponible pour the premier render and defer seulement rules pas nécessaire yet. Confirmer: a throttled filmstrip montre styled content from the premier painted frame.
A fix improves FCP but creates layout shifts
Probable causer: deferred styles or late component initialization changements geometry après paint. Fix: preserve sizing and layout-critical rules in the initial render. Confirmer: the faster premier paint remains and the Layout Shifts track montre aucun nouveau instability.
The audit flags a différent resource on the suivant run
Probable causer: consent-manager gating, third-party tag charger order, CSP, service-worker mise en cache, or plain cache state modifié ce que got découvert or executed entre runs — a unique trace isn’t a permanent classification. Fix: repeat the trace à travers the states que matter (premier visit vs. mis en cache, consent accepted vs. declined) avant treating un run’s flagged resource as the fix target. Confirmer: the même resource encore montre as the dominant blocker à travers matched, repeated traces.
Simplified render-blocking exemples
Parser-blocking script versus deferred script
The premier script arrête HTML parsing. The second downloads in parallel and waits jusqu’à parsing is complet.
<!-- Blocks the parser -->
<script src="app.js"></script>
<!-- Better for a script that depends on the parsed document -->
<script defer src="app.js"></script>Un stylesheet pour every viewport versus conditional CSS
The media attribute garde a print-only stylesheet from blocking the screen render.
<link rel="stylesheet" href="screen.css">
<link rel="stylesheet" href="print.css" media="print">Critical styles avant the deferred bundle
Ce simplified pattern rend the petit initial layout disponible immédiatement. Production implementations encore besoin testing pour CSP, mise en cache, and flashes of unstyled content.
<style>
.site-header { min-height: 4rem; }
</style>
<link rel="stylesheet" href="site.css"> Prompt: classify the critical resources
Paste a DevTools Network export or a liste of the document’s early CSS and JavaScript requêtes.
Act as a web-performance reviewer. Classify each supplied CSS or JavaScript
resource as required for the first viewport, required after HTML parsing, or
non-critical. For every classification, cite the evidence present in my input.
Recommend only one of: keep blocking, defer, async, conditional media, split,
or remove. Flag anything you cannot decide without inspecting runtime behavior.
Do not assume that every stylesheet or script is safe to delay.
INPUT:
[paste the request list, initiators, timing, and what the resource controls]Prompt: examiner an implementation diff
Review this HTML/CSS/JavaScript diff for render-path regressions. Check script
ordering, DOM dependencies, critical CSS coverage, flashes of unstyled content,
layout-shift risk, duplicate downloads, and failure when JavaScript is delayed.
Return a table with: finding, evidence from the diff, user-visible risk, test to
run, and safest correction. Do not invent page behavior not shown in the input.
DIFF:
[paste the diff] Liste potentially blocking head resources
Paste ce into the DevTools Console. Le résultat is an audit queue, pas an instruction to defer everything.
const headResources = [...document.head.querySelectorAll('link[rel="stylesheet"], script[src]')]
.map((element) => ({
type: element.tagName.toLowerCase(),
url: element.href || element.src,
async: element.tagName === 'SCRIPT' ? element.async : undefined,
defer: element.tagName === 'SCRIPT' ? element.defer : undefined,
media: element.tagName === 'LINK' ? element.media || 'all' : undefined,
}));
console.table(headResources);Trouver resources que finished avant premier paint
const firstPaint = performance.getEntriesByName('first-contentful-paint')[0]?.startTime;
console.table(
performance.getEntriesByType('resource')
.filter((entry) => firstPaint && entry.responseEnd <= firstPaint)
.map((entry) => ({ name: entry.name, type: entry.initiatorType, end: Math.round(entry.responseEnd) }))
);Resources in ce liste consumed temps avant FCP, but timing alone ne fait pas prove que a resource blocked rendering. Confirmer with the trace and dependency chain.
Outils pour finding render blockers
- PageSpeed Insights and Lighthouse: identifier render-blocking requête opportunities in a repeatable lab run. Treat the estimated savings as a lead plutôt que a guarantee.
- Chrome DevTools Performances panel: connecter requêtes, HTML parsing, script execution, style calculation, and the premier painted frame on un timeline.
- Chrome DevTools Network panel: inspect requête priority, initiators, timing, protocol, cache behavior, and the order in qui critical fichiers arrive.
- Chrome DevTools Coverage panel: trouver unused CSS and JavaScript in the recorded journey. Coverage from un route n’est pas permission to delete code utilisé elsewhere.
- WebPageTest: comparer waterfalls and filmstrips sous différent locations and connection profiles.
The utile workflow is Lighthouse pour the clue, the Performances and Network panels pour the causer, alors a throttled avant/après recording pour proof.
Prove a render-blocking fix worked
Deferred-script tester
Tester to run: record a cold, throttled charger avant and après ajout defer, alors inspect parsing and the premier paint. Attendu result: HTML parsing continues pendant que the script downloads and lune page encore initializes correctement après parsing. Échec interpretation: the script dépend on immediate execution or ordering was modifié incorrectly. Monitoring window: immediate in repeated traces. Rollback trigger: manquant content, JavaScript errors, or broken interactions.
Conditional-stylesheet tester
Tester to run: charger chaque relevant viewport and media mode pendant que recording the Network and Performances panels. Attendu result: non-matching CSS ne fait pas delay the screen’s premier render, pendant que matching layouts remain styled. Échec interpretation: critical rules were placed in the incorrect bundle or the media condition is incomplete. Monitoring window: immediate à travers the pris en charge breakpoints. Rollback trigger: unstyled content, incorrect print output, or nouveau layout shifts.
Critical-path comparison
Tester to run: comparer the même page, device profile, and cold-cache conditions avant and après the modifier, and repeat chaque side of the comparison plutôt que relying on a unique trace. Attendu result: the blocking chain and FCP/LCP timing améliorer consistently à travers matched, repeated runs plutôt que in un lucky run. Échec interpretation: variance, un autre bottleneck, or a runtime-state difference (consent state, third-party tag timing, CSP, service-worker cache) explique the apparent gain. Monitoring window: several controlled lab runs, followed by field monitoring. Rollback trigger: field LCP, CLS, errors, or conversion behavior worsens après release.
Testez vos connaissances: Ressources qui bloquent le rendu
Five rapide questions on render-blocking CSS and JavaScript. Pick an réponse pour chaque, alors vérifier.
Journal des modifications
Mis à jour le 27 juil. 2026.
Résumé éditorial et détails enregistrés des changements.Détails des changements
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
Comparaison complète indisponible — aucun instantané antérieur n’a été archivé pour cette révision.
Mis à jour le 18 juil. 2026.
Résumé éditorial et détails enregistrés des changements.Détails des changements
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
Comparaison complète indisponible — aucun instantané antérieur n’a été archivé pour cette révision.