Panduan Render-Blocking Resources
What render-blocking resources adalah, how CSS dan synchronous JavaScript delay critical rendering path, why itu hurts Core Web Vitals (dan indirectly SEO), cara temukan them, dan cara fix them dengan async, defer, critical CSS, dan media kueri.
Bahasa
Render-blocking resources adalah CSS dan synchronous JavaScript files sebuah browser harus download dan process sebelum ini dapat paint anything. sebuah applicable stylesheet di head adalah render-blocking oleh default; sebuah <script> di head without async atau defer adalah parser-blocking oleh default (sebuah related tetapi formally distinct mechanism dari HTML spec's explicit blocking="render" _(terjemahan)_ “render” attribute). async memuat di parallel dan runs when ready (unordered); defer memuat di parallel dan runs setelah parsing, di order; module scripts defer oleh default. mereka dapat delay pertama Contentful Paint dan Largest Contentful Paint, dan LCP adalah digunakan oleh Google's Core Web Vitals peringkat sistem — sebuah tiebreaker, not sebuah documented dominant peringkat factor. semua eligible 200-status halaman enter Google's rendering queue regardless dari whether JavaScript adalah present; Google fetches di sebagian besar 2 MB per non-PDF URL (including headers), separately untuk setiap referenced file, which adalah sebuah fetch limit, not sebuah render-blocking-spesifik penalty. temukan them dengan saat ini Lighthouse 13 'Render blocking permintaan' Insight dan Chrome DevTools Coverage tab; fix oleh deferring non-critical JS, inlining hanya critical CSS where sebuah trace menampilkan ini adalah bottleneck, dan menggunakan media attributes untuk conditional stylesheets — lalu re-test pada sebuah 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 — Render-blocking resources adalah CSS dan JavaScript files Anda browser memiliki untuk download dan run sebelum ini dapat tampilkan anything pada screen. sebuah blank white halaman while itu files muat adalah symptom. CSS blocks oleh default; sebuah
<script>di<head>withoutasyncataudeferjuga blocks. fix adalah untuk muat non-essential stuff later so halaman dapat paint sooner.
What “render-blocking” (terjemahan) “render-blocking” berarti
When someone opens Anda halaman, browser reads HTML dari top untuk bottom. Along cara ini hits files ini perlu untuk draw halaman — mostly CSS stylesheets dan JavaScript. beberapa dari itu files membuat browser stop dan wait: ini won’t paint sebuah single pixel until mereka’re downloaded dan processed. itu adalah render-blocking resources.
itu’s why sebuah slow halaman sering menampilkan sebuah blank white screen pertama, lalu everything appears di once. browser memiliki HTML, tetapi ini adalah waiting pada sebuah stylesheet atau sebuah script sebelum ini akan draw anything.
two jenis
- CSS adalah render-blocking oleh default when browser discovers sebuah
<link rel="stylesheet">di<head>while parsing dan stylesheet actually applies (no non-matchingmedia, nodisabled). browser doesn’t ingin untuk tampilkan Anda unstyled konten dan lalu re-style ini (itu flash looks broken), so ini waits untuk applicable CSS sebelum painting. - JavaScript pauses HTML parsing when ini adalah sebuah plain
<script>di<head>withoutasyncataudefer— browser memiliki untuk stop reading HTML, go fetch script, run ini, dan hanya lalu continue. (Technically ini adalah “parser-blocking” (terjemahan) “parser-blocking”; whether ini juga formally counts sebagai “render-blocking” (terjemahan) “render-blocking” depends pada browser internals sebagian besar readers don’t perlu — see Advanced.)
mengapa ini penting
longer browser waits, longer Anda pengunjung stares di nothing. Google measures when berguna konten appears (sebuah metric called Largest Contentful Paint), dan itu’s bagian dari Core Web Vitals — sebuah kecil sinyal peringkat. So render-blocking resources dapat hurt both Anda pengunjung’ experience dan, indirectly, Anda SEO.
sederhana fixes
- tambahkan
deferuntuk scripts so mereka download alongside halaman dan run setelah ini adalah drawn. - Don’t put more CSS atau JavaScript di
<head>daripada pertama screen actually perlu. - jika Anda’re pada WordPress, plugins like WP Rocket atau Autoptimize melakukan ini untuk Anda dengan sebuah checkbox.
ingin mechanics — async vs defer, critical CSS, crawl-budget angle, dan
what Google actually says? Switch untuk Advanced 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 — Render-blocking resources delay sebuah halaman’s pertama paint. sebuah applicable CSS stylesheet di
<head>blocks oleh default (non-matchingmedia,disabled, atau dynamic insertion dengan no explicitblocking="render"don’t). sebuah parser-inserted classic<script>withoutasync/deferadalah parser-blocking oleh default — pausing HTML parsing — which adalah sebuah related tetapi distinct mechanism dari formal “render-blocking” (terjemahan) “render-blocking” attribute model.asyncmemuat di parallel dan executes when downloaded (unordered, dapat interrupt parsing);defermemuat di parallel dan executes setelah HTML adalah parsed (di order); module scripts defer oleh default. ini delays dapat push back FCP dan LCP, dan LCP adalah digunakan oleh Google’s peringkat sistem — tetapi ini adalah sebuah tiebreaker, not sebuah dominant factor, dan Google documents no direct render-blocking peringkat weight. Google fetches di sebagian besar 2 MB per non-PDF URL (including headers), separately untuk setiap referenced JS/CSS file — sebuah truncation boundary, not sebuah render-blocking-spesifik penalty — dan semua eligible 200-status halaman enter Google’s rendering queue whether atau not mereka gunakan JavaScript. temukan blockers dengan saat ini Lighthouse 13 “Render-blocking requests” (terjemahan) “Render-blocking permintaan” Insight dan DevTools Coverage tab; fix dengandefer, critical CSS hanya where sebuah trace menampilkan ini adalah bottleneck,mediaattributes, dan menghapus unused code — lalu re-test dengan sebuah repeated, matched trace.
critical rendering path
untuk draw sebuah halaman, sebuah browser runs sebuah fixed sequence: parse HTML ke DOM, parse CSS ke CSSOM, combine them ke sebuah render tree, lay ini out, dan paint. itu sequence adalah critical rendering path, dan anything itu stalls ini delays pertama pixel. sebagai Google’s Ilya Grigorik framed ini, “optimizing the critical rendering path refers to prioritizing the display of content that relates to the current user action.” (terjemahan) “optimizing critical rendering path refers untuk prioritizing display dari konten itu relates untuk saat ini pengguna tindakan.” Render-blocking resources adalah things sitting di itu path dengan mereka hand up, membuat browser wait.
CSS adalah render-blocking oleh default — when ini adalah applicable
browser akan not paint styled konten until ini memiliki CSSOM dibangun dari setiap
applicable blocking stylesheet, dan MDN’s <link> reference adalah explicit tentang
scope: “only link elements in the document’s <head> can possibly block
rendering. By default, a link element with rel="stylesheet" in the <head>
blocks rendering when the browser discovers it during parsing.” (terjemahan) “hanya undefined elements di document’s undefined dapat possibly block
rendering. oleh default, sebuah undefined element dengan undefined di undefined
blocks rendering when browser discovers ini selama parsing.” dari web.dev’s
mengoptimalkan LCP guide: “Style sheets loaded from the HTML markup will block
rendering of all content that follows them.” (terjemahan) “Style sheets dimuat dari HTML markup akan block
rendering dari semua konten itu mengikuti them.” ini adalah intentional — painting
unstyled HTML pertama dan re-styling ini produces sebuah ugly flash — tetapi “by default” (terjemahan) “oleh default”
memiliki nyata edges:
- sebuah stylesheet dengan sebuah non-matching
mediaattribute (e.g.media="print"pada sebuah screen visit) adalah fetched tetapi doesn’t block. - sebuah stylesheet dengan
disabledset isn’t dimuat atau applied until Anda jelas attribute. - sebuah stylesheet ditambahkan dynamically via script isn’t render-blocking unless Anda juga
set
blocking="render"pada ini explicitly — dynamic insertion opts out dari default.
di dalam -nya applicable scope, sebuah bloated blocking stylesheet dapat masih hold whole halaman hostage: when ini takes longer untuk muat daripada Anda LCP image itself, LCP element dapat’t render bahkan setelah -nya own resource memiliki finished downloading.
Scripts: parser-blocking oleh default, formally render-blocking pada permintaan
sebuah parser-inserted classic <script> di <head> without async atau defer adalah
parser-blocking oleh default: browser stops membangun DOM, fetches
script, executes ini, dan hanya lalu resumes. Google’s legacy PageSpeed docs spell out
cost: “whenever the parser encounters a script it has to stop and execute it
before it can continue parsing the HTML. In the case of an external script the
parser is also forced to wait for the resource to download, which may incur one or
more network roundtrips and delay the time to first render of the page.” (terjemahan) “whenever parser encounters sebuah script ini memiliki untuk stop dan execute ini
sebelum ini dapat continue parsing HTML. di case dari sebuah external script
parser adalah juga forced untuk wait untuk resource untuk download, which dapat incur one atau
more network roundtrips dan delay time untuk pertama render dari halaman.” sebagai
mengoptimalkan LCP guide puts ini bluntly, “it is almost never necessary to add
synchronous scripts… to the <head> of your pages.” (terjemahan) “ini adalah almost tidak pernah necessary untuk tambahkan
synchronous scripts… untuk undefined dari Anda halaman.”
Worth menjadi precise here: parser-blocking dan HTML spec’s formal
render-blocking attribute model adalah related tetapi distinct mechanisms. Per MDN’s
<script> reference, blocking="render" token “explicitly indicates that
certain operations should be blocked until the script has executed,” (terjemahan) “explicitly indicates itu
certain operations seharusnya menjadi blocked until script memiliki executed,” dan “only
script elements in the document’s <head> can possibly block rendering” (terjemahan) “hanya
undefined elements di document’s undefined dapat possibly block rendering” ini
cara — “if such a script element is added dynamically via script, you must set
blocking = "render" for it to block rendering.” (terjemahan) “jika such sebuah undefined element adalah ditambahkan dynamically via script, Anda harus set
undefined untuk ini untuk block rendering.” dalam praktik, sebuah default
parser-blocking <head> script sudah stalls pipeline enough itu
distinction rarely perubahan what Anda melakukan tentang ini; ini penting mainly untuk dynamically
inserted scripts, which perlu explicit attribute untuk participate, dan browser
mendukung untuk blocking="render" adalah masih limited dan worth memeriksa sebelum Anda rely
pada ini.
One more default worth knowing: type="module" scripts defer oleh default (no
defer attribute needed) unless async adalah ditambahkan untuk perubahan itu scheduling.
async vs defer — mereka adalah not yang sama
ini adalah single sebagian besar berguna distinction untuk fixing render-blocking JS. Both download script di parallel dengan HTML parsing, so neither adalah parser-blocking selama download. mereka differ di execution:
async— executes immediately when download finishes, which dapat interrupt parsing, dan runs di no guaranteed order. baik untuk truly independent ketiga-party scripts (analytics, ads) itu don’t touch Anda DOM atau depend pada setiap lainnya.defer— executes setelah HTML adalah fully parsed, di document order. baik untuk scripts itu depend pada DOM atau pada setiap lainnya (sebagian besar dari Anda own code).- Module scripts (
type="module") — deferred oleh default; tambahkanasyncjika Anda specifically ingin module-ready-order execution instead.
jika Anda remember one aturan: defer untuk anything ordered atau DOM-dependent, async
hanya untuk fire-dan-forget ketiga-party scripts.
How ini affects SEO
chain adalah nyata tetapi memiliki nyata boundaries. Don’t overstate ini di either direction:
- Render-blocking resources delay pertama Contentful Paint — when apa pun konten pertama appears.
- mereka dapat delay Largest Contentful Paint — Google’s primary memuat metric — though sebuah flagged resource isn’t proof ini adalah dominant field bottleneck, dan menghapus ini doesn’t guarantee sebuah better LCP; Lighthouse Insight reports sebuah potential delay dari one observed trace, not sebuah guaranteed field effect.
- LCP adalah sebuah Core Web Vitals metric, diukur di 75th percentile dari nyata data lapangan di atas 28 days, dan Google says Core Web Vitals “are used by our ranking systems.” (terjemahan) “adalah digunakan oleh kami peringkat sistem.” “good” (terjemahan) “baik” LCP threshold adalah ≤2,5 s.
- Google’s halaman-experience documentation doesn’t define sebuah direct render-blocking peringkat weight, chain, atau tiebreaker, dan gives no peringkat guarantee dari menghapus blockers — ini says relevance masih wins, tetapi “having a great page experience can contribute to success in Search” (terjemahan) “having sebuah great halaman experience dapat contribute untuk success di Search” when there’s lots dari similarly helpful konten untuk choose dari.
pertahankan weighting honest. Martin Splitt’s line adalah right calibration: “a fast website is a little more helpful than a slow website,” (terjemahan) “sebuah fast situs web adalah sebuah little more helpful daripada sebuah slow situs web,” tetapi “content is still the king.” (terjemahan) “konten adalah masih king.” Fixing sebuah resource itu’s genuinely delaying Anda LCP adalah worth doing untuk UX dan sebagai one input among banyak Google’s sistem weigh — ini adalah not sebuah lever dengan sebuah documented, dedicated peringkat multiplier.
crawl-efficiency angle — corrected
I previously framed heavy render-blocking JavaScript sebagai something itu “pushes” (terjemahan) “pushes” atau “forces” (terjemahan) “forces” halaman ke Google’s rendering queue. itu’s not accurate, dan ini adalah worth correcting plainly: Google’s saat ini JavaScript SEO documentation states itu “all pages with a 200 HTTP status code are sent to the rendering queue, no matter whether JavaScript is present on the page.” (terjemahan) “semua halaman dengan sebuah 200 HTTP kode status adalah dikirim untuk rendering queue, no penting whether JavaScript adalah present pada halaman.” setiap eligible halaman goes melalui itu queue — render-blocking resources don’t buat special pada-ramp ke ini.
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 basicsWhat resource jenis melakukan perubahan adalah how much berfungsi happens once sebuah halaman reaches rendering. Onely’s experiment ditemukan Google needed 9× longer untuk fully crawl JavaScript-rendered halaman daripada identical HTML halaman (313 hours vs. 36 hours) di mereka test setup, because “pages that require rendering have to wait in a rendering queue in addition to the crawl queue which applies to all pages.” (terjemahan) “halaman itu memerlukan rendering memiliki untuk wait di sebuah rendering queue di addition untuk crawl queue which applies untuk semua halaman.” Treat itu sebagai evidence itu konten requiring rendering sisi klien carries sebuah nyata time-untuk-indeks cost di itu study — not sebagai proof itu sebuah spesifik render-blocking CSS atau JS file adalah what triggers queueing.
pada file size: Google’s crawling documentation describes sebuah 2 MB fetch limit per
non-PDF URL, including header HTTP, applied separately untuk setiap individual
resource ini permintaan — so sebuah besar <head> script atau stylesheet gets -nya own 2 MB
counter, not sebuah shared budget dengan HTML. itu’s sebuah fetch/truncation boundary,
not sebuah “processing limit,” (terjemahan) “processing limit,” dan Google doesn’t document sebuah special crawl atau pengindeksan
penalty tied specifically untuk render-blocking resources beyond itu umum
truncation risk.
Worth debunking while kami’re here: Google’s renderer memiliki no fixed timeout. sebagai I’ve documented di my JavaScript SEO guide, “there is no fixed timeout for the renderer. It runs with a sped-up timer to see if anything is added at a later time.” (terjemahan) “tidak ada fixed timeout untuk renderer. ini runs dengan sebuah sped-up timer untuk see jika anything adalah ditambahkan di sebuah later time.” concern isn’t sebuah 5-kedua cutoff — ini adalah queueing delay sebelum rendering bahkan begins.
ini bahkan reaches AI crawler now. Gary Illyes argued di 2026 itu “if sites used relatively good HTML and no JavaScript (or SSR), both base model training, and web and agentic RAG would be a piece of cake from raw data processing perspective.” (terjemahan) “jika situs digunakan relatively baik HTML dan no JavaScript (atau SSR), both base model training, dan web dan agentic RAG akan menjadi sebuah piece dari cake dari raw data processing perspective.” Heavy client-side JS adalah sebuah masalah well beyond Googlebot.
cara temukan them
- Chrome DevTools performa panel / Lighthouse 13 — saat ini “Render
blocking requests” (terjemahan) “Render
blocking permintaan” Insight (which, sebagai dari Lighthouse 13, adalah where older
“Eliminate render-blocking resources” (terjemahan) “Eliminate render-blocking resources” audit moved) flags scripts di
<head>missingasync/deferdan stylesheets without sebuahdisabledatau non-matchingmediaattribute, dan estimates ms Anda’d save dari one observed trace. Connor Clark’s write-up puts ini plainly: “render-blocking requests are network requests that prevent a page’s initial render, potentially delaying Largest Contentful Paint.” (terjemahan) “render-blocking permintaan adalah network permintaan itu mencegah sebuah halaman’s initial render, potentially delaying Largest Contentful Paint.” jika Anda’re reading older PageSpeed Insights output itu masih says “Eliminate render-blocking resources,” (terjemahan) “Eliminate render-blocking resources,” ini adalah yang sama underlying signal di bawah pre-Lighthouse-13 name. - Chrome DevTools Coverage tab — marks bytes green (critical — digunakan untuk pertama paint) atau red (unused di pertama paint). Lots dari red CSS/JS adalah Anda candidate list.
- WebPageTest waterfall — lihat everything sebelum Start Render line.
- Run ini more daripada once — sebuah single trace reflects itu run’s consent-manager state, ketiga-party tag muat, cache state, dan CSP perilaku. Repeat trace (cold dan warm) sebelum treating one flagged resource sebagai sebuah 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.
cara fix them
JavaScript
defernon-critical scripts —<script src="app.js" defer></script>. Parallel download, ordered execution setelah parse. safe default untuk Anda own JS.asyncuntuk independent ketiga-party scripts —<script src="analytics.js" async></script>. hanya when order dan DOM-readiness genuinely don’t penting.- Move scripts untuk end dari
<body>— older fallback when Anda dapat’t tambahkan attributes; parser reaches them last.
CSS — sebagai conditional decisions, not blanket patterns
- Inline critical CSS hanya when sebuah trace menampilkan CSS adalah actual bottleneck —
extract styles needed untuk above—fold konten ke sebuah inline
<style>block so pertama paint perlu no round-trip. Google’s own caution applies: “inlining CSS is an advanced performance technique that can improve performance, but can also lead to bugs if not implemented properly.” (terjemahan) “inlining CSS adalah sebuah advanced performa technique itu dapat meningkatkan performa, tetapi dapat juga lead untuk bugs jika not implemented properly.” Inline hanya critical subset, name sebuah owner untuk regenerating ini when templates perubahan, dan periksa untuk drift di seluruh halaman states — sebuah critical-CSS snapshot itu goes stale silently reintroduces flashes dari unstyled konten atau missing styles. - Defer rest, matching permintaan exactly — muat full stylesheet dengan
<link rel="preload" as="style" onload="this.rel='stylesheet'">pattern. sebuah preload hanya gets reused untuk eventual permintaan jika URL,as,type, dancrossorigin/CORS mode match — sebuah mismatched hint causes browser untuk fetch resource twice alih-alih skipping round-trip. mediaattributes —media="print"ataumedia="(min-width: 900px)"lets browser download sebuah stylesheet without blocking render when kueri doesn’t match.- hapus unused CSS dan minify — less untuk block pada, faster downloads.
- Verify sebelum shipping — re-periksa untuk duplicate/unused fetches, FOUC, dan baru layout shift setelah apa pun critical-CSS atau preload perubahan, pada sebuah repeated trace, not sebuah single lucky run.
Platform-spesifik (WordPress) — WP Rocket (delay/defer JS, mengoptimalkan CSS delivery),
Autoptimize (async/defer JS, inline critical CSS), dan Async JavaScript implement semua
dari above melalui plugin UI. mereka’re applying yang sama async/defer/critical-CSS
techniques — knowing what setiap setting melakukan adalah how Anda hindari breaking Anda theme.
Related reading pada ini situs
- Core Web Vitals — parent metric set ini rolls up ke.
- Largest Contentful Paint — metric render-blocking resources hit hardest.
- pertama Contentful Paint — pertama thing mereka delay.
- Total Blocking Time — main-thread cost dari heavy JS.
- PageSpeed Insights — alat itu surfaces audit.
- rendering dan anggaran crawling — crawl/render queue angle.
AI summary
sebuah condensed take pada Advanced versi:
- Render-blocking resources adalah CSS dan synchronous JavaScript pada critical
rendering path. sebuah applicable stylesheet (
<head>, matchingmedia, notdisabled, not dynamically inserted) adalah render-blocking oleh default; sebuah parser-inserted<script>withoutasync/deferadalah parser-blocking oleh default, which adalah related untuk tetapi formally distinct dari HTML spec’sblocking="render"attribute (head-hanya; diperlukan untuk dynamically inserted scripts/stylesheets). async= parallel download, executes when ready, unordered, dapat interrupt parsing — gunakan untuk independent ketiga-party scripts.defer= parallel download, executes setelah parse, di order — gunakan untuk Anda own/DOM-dependent code. Module scripts (type="module") defer oleh default.- SEO chain: mereka dapat delay FCP dan LCP (sebuah flagged resource isn’t proof ini adalah dominant bottleneck); LCP adalah digunakan oleh Google’s Core Web Vitals peringkat sistem (baik ≤2,5 s). Google documents no direct render-blocking peringkat weight atau guarantee — “a fast website is a little more helpful… content is still the king.” (terjemahan) “sebuah fast situs web adalah sebuah little more helpful… konten adalah masih king.”
- crawl angle, corrected: semua eligible 200-status halaman enter Google’s rendering queue regardless dari JavaScript presence — render-blocking resources don’t buat special queue pada-ramp. Google fetches di sebagian besar 2 MB per non-PDF URL (including headers), per resource — sebuah fetch/truncation boundary, not sebuah render-blocking-spesifik processing penalty. Onely’s study ditemukan Google took 9× longer untuk fully crawl JS-rendered halaman daripada HTML di mereka test — evidence dari sebuah rendering-langkah cost, not proof sebuah spesifik blocker triggers queueing. No fixed renderer timeout — cost adalah queueing, not sebuah cutoff.
- temukan: Lighthouse 13’s “Render blocking requests” (terjemahan) “Render blocking permintaan” Insight (formerly “Eliminate render-blocking resources” (terjemahan) “Eliminate render-blocking resources”); DevTools Coverage tab (green = critical, red = unused); WebPageTest waterfall sebelum Start Render. Repeat trace — consent, ketiga-party, dan cache state dapat perubahan hasil run untuk run.
- Fix:
defernon-critical JS,asyncindependent ketiga-party JS; inline critical CSS hanya where sebuah trace menampilkan ini adalah bottleneck (dengan sebuah owner untuk keeping ini di sync) dan defer rest, matching preload’sas/type/crossoriginexactly;mediaattributes untuk conditional stylesheets; hapus unused CSS dan minify; verify dengan sebuah repeated, matched trace sebelum shipping.
Official documentation
Primary-source guidance dari Google dan Bing.
Google / Chrome
- Render blocking permintaan (Chrome DevTools performa Insights) — saat ini authoritative explainer (Connor Clark, Oct 2025), dan Lighthouse 13 Insight ini topic now lives di bawah: defer, inline, reduce payload.
- Eliminate render-blocking resources (legacy Lighthouse audit) — masih live tetapi carries sebuah banner itu ini moved ke Insight above sebagai dari Lighthouse 13; dipertahankan here untuk readers pada older reports.
- mengoptimalkan Largest Contentful Paint — how render-blocking CSS dan synchronous scripts delay LCP (Philip Walton & Barry Pollard).
- Critical rendering path — underlying parse → CSSOM → render-tree → paint sequence (Ilya Grigorik).
- hapus render-blocking JavaScript (legacy PageSpeed docs) — deprecated PSI v4, tetapi parser-blocking mechanics adalah masih accurate.
- Core Web Vitals & Google Search — LCP thresholds dan how CWV relate untuk peringkat.
- memahami JavaScript SEO basics — confirms semua eligible 200-status halaman enter rendering queue regardless dari JavaScript presence.
- Understanding pengalaman halaman di Google hasil pencarian — saat ini, bounded language pada how Core Web Vitals relate untuk peringkat (no direct render-blocking weight documented).
HTML / browser spec (mechanics)
<script>: Script element (MDN) —async/defersemantics, module default-defer, danblocking="render"attribute (head-hanya; diperlukan untuk dynamically inserted scripts).<link>: External Resource tautan element (MDN) — stylesheetmedia/disabledperilaku,blockingattribute, dan preload’sas/type/crossoriginpermintaan-matching requirements.- HTML Standard — script element (WHATWG) — formal parser-blocking dan render-blocking definitions ini artikel’s script bagian adalah berdasarkan.
Bing / Microsoft
- bingbot Series: JavaScript, Dynamic rendering, dan Cloaking — why JS di scale adalah hard untuk Bingbot, dan dynamic rendering sebagai sebuah acceptable workaround (Fabrice Canel & Frédéric Dubut).
- Bing Webmaster Guidelines — kecepatan halaman sebagai sebuah peringkat factor; minimizing render-blocking JavaScript.
Quotes dari source
pada—record statements. setiap tautan deep-tautan untuk quoted passage where source halaman allows ini.
Google / Chrome — 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.” (terjemahan) “ goal adalah untuk reduce impact dari ini render-blocking URLs oleh inlining critical resources, deferring non-critical resources, dan menghapus anything unused.” — Chrome Lighthouse docs. Jump untuk quote
- “Render-blocking requests are network requests that prevent a page’s initial render, potentially delaying Largest Contentful Paint (LCP).” (terjemahan) “Render-blocking permintaan adalah network permintaan itu mencegah sebuah halaman’s initial render, potentially delaying Largest Contentful Paint (LCP).” — Connor Clark, Chrome DevTools performa Insights. Jump untuk quote
- “Style sheets loaded from the HTML markup will block rendering of all content that follows them.” (terjemahan) “Style sheets dimuat dari HTML markup akan block rendering dari semua konten itu mengikuti them.” — web.dev, mengoptimalkan LCP (Philip Walton & Barry Pollard). Jump untuk quote
- “It is almost never necessary to add synchronous scripts (scripts without the async or defer attributes) to the head of your pages.” (terjemahan) “ini adalah almost tidak pernah necessary untuk tambahkan synchronous scripts (scripts without async atau defer attributes) untuk head dari Anda halaman.” — web.dev, mengoptimalkan LCP. Jump untuk quote
- “Optimizing the critical rendering path refers to prioritizing the display of content that relates to the current user action.” (terjemahan) “Optimizing critical rendering path refers untuk prioritizing display dari konten itu relates untuk saat ini pengguna tindakan.” — Ilya Grigorik, web.dev, Critical rendering path. Jump untuk quote
- “Avoid and minimize the use of blocking JavaScript, especially external scripts that must be fetched before they can be executed.” (terjemahan) “hindari dan minimize gunakan dari blocking JavaScript, terutama external scripts itu harus menjadi fetched sebelum mereka dapat menjadi executed.” — Google PageSpeed Insights docs (legacy). Jump untuk quote
- “All pages with a 200 HTTP status code are sent to the rendering queue, no matter whether JavaScript is present on the page.” (terjemahan) “semua halaman dengan sebuah 200 HTTP kode status adalah dikirim untuk rendering queue, no penting whether JavaScript adalah present pada halaman.” — Google, memahami JavaScript SEO basics.
- “Only
scriptelements in the document’s<head>can possibly block rendering” (terjemahan) “hanya undefined elements di document’s undefined dapat possibly block rendering” dan, untuk dynamic insertion, “you must setblocking = "render"for it to block rendering.” (terjemahan) “Anda harus set undefined untuk ini untuk block rendering.” — MDN,<script>: 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.” (terjemahan) “ini adalah difficult untuk bingbot untuk process JavaScript di scale pada setiap halaman dari setiap situs web, while minimizing angka dari HTTP permintaan.” — Fabrice Canel & Frédéric Dubut, Microsoft Bing. Jump untuk quote
Industry research — 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.” (terjemahan) “halaman itu memerlukan rendering memiliki untuk wait di sebuah rendering queue di addition untuk crawl queue which applies untuk semua halaman.” — Ziemek Bućko, Onely (Google needed 9× longer untuk crawl JS daripada HTML). Jump untuk quote
- “You can do this by deferring the loading of non-critical CSS and JavaScript files needed for ‘below the fold’ content until later.” (terjemahan) “Anda dapat melakukan ini oleh deferring memuat dari non-critical CSS dan JavaScript files needed untuk ‘below fold’ konten until later.” — Joshua Hardwick, Ahrefs. Jump untuk quote
Render-blocking fix checklist
berfungsi top untuk bottom — diagnose pertama, lalu fix highest-savings items.
- Run PageSpeed Insights / Lighthouse dan open saat ini “Render blocking requests” (terjemahan) “Render blocking permintaan” Insight (Lighthouse 13; older reports dapat masih label ini “Eliminate render-blocking resources” (terjemahan) “Eliminate render-blocking resources”); note estimated ms savings per resource sebagai sebuah lead, not sebuah guarantee.
- Open DevTools Coverage tab dan reload — flag stylesheets/scripts itu adalah mostly red (unused di pertama paint).
- tambahkan
deferuntuk setiap non-critical<script>itu depends pada DOM atau pada lainnya scripts. - gunakan
asynchanya untuk genuinely independent ketiga-party scripts (analytics, ads) — tidak pernah untuk ordered atau DOM-dependent code. - Confirm no synchronous
<script>sits di<head>withoutasync/defer. - Inline hanya critical (above—fold) CSS; muat rest dengan
preload+onloadpattern — don’t inline everything. - tambahkan
mediaattributes untuk conditional stylesheets (print, breakpoint kueri) so mereka download without blocking. - hapus unused CSS dan minify semua CSS/JS untuk shrink download time.
- pertahankan individual JS/CSS files well di bawah Google’s 2 MB per-URL fetch limit (mencakup header HTTP; ini adalah sebuah truncation boundary, not sebuah render-blocking penalty, tetapi sebuah truncated file dapat masih break behind scenes).
- Re-test pada sebuah repeated, matched trace (cache/consent/ketiga-party state dapat shift hasil) dan periksa field LCP — aim untuk land LCP ≤2,5 s di 75th percentile.
- Sanity-periksa halaman visually setelah CSS inlining — ini adalah langkah sebagian besar mungkin untuk introduce bugs.
Render-blocking cheat sheet
async vs defer vs plain <script>
| Attribute | Blocks parser? | Download | Execution order | gunakan untuk |
|---|---|---|---|---|
none (sync <script>) | Yes | Pauses parsing untuk fetch | Immediately, blocks render | Almost tidak pernah di <head> |
async | No (selama download) | Parallel | When ready — unordered, dapat interrupt parse | Independent ketiga-party scripts (analytics, ads) |
defer | No | Parallel | setelah HTML parsed — di document order | Anda own / DOM-dependent code |
adalah ini resource render-blocking?
| Resource | Render-blocking? | cara un-block ini |
|---|---|---|
<link rel="stylesheet"> di <head>, applicable | Yes (default) | Non-matching media, disabled, atau preload+onload |
<link media="print"> (pada sebuah screen visit) | No | (sudah non-blocking) |
| Stylesheet inserted dynamically via script | No, unless blocking="render" set | tambahkan blocking="render" hanya jika Anda specifically perlu ini untuk block |
Sync <script> di <head> (no async/defer) | Parser-blocking oleh default | tambahkan defer (atau async jika independent) |
<script defer> / <script async> / <script type="module"> | No | — |
| Inline critical CSS | No | (itu’s poin — pertahankan ini kecil) |
Fast facts
- LCP “good” (terjemahan) “baik” threshold: ≤ 2,5 s di 75th percentile dari data lapangan (28-day window).
- Google fetches di sebagian besar 2 MB per non-PDF URL (including headers), counted separately untuk setiap referenced JS/CSS file — sebuah fetch/truncation boundary, not sebuah documented render-blocking-spesifik penalty.
- semua eligible 200-status halaman enter Google’s rendering queue regardless dari whether JavaScript adalah present — render-blocking resources don’t buat special queue pada-ramp.
- Google’s renderer memiliki no fixed timeout — cost adalah rendering queue, not sebuah cutoff.
- Lighthouse 13’s “Render blocking requests” (terjemahan) “Render blocking permintaan” Insight (formerly “Eliminate
render-blocking resources” (terjemahan) “Eliminate
render-blocking resources” audit) flags head scripts missing
async/defer, dan stylesheets withoutdisabled/ non-matchingmedia, dari one observed trace — re-test untuk confirm. - DevTools Coverage: green = critical, red = unused di pertama paint.
- Inlining CSS adalah advanced — inline hanya critical subset where sebuah trace menampilkan ini adalah bottleneck; inlining semua dari ini kills caching dan causes bugs.
- Preload hanya gets reused jika
as/type/crossoriginmatch eventual permintaan — sebuah mismatch causes sebuah duplicate fetch.
Diagnose render-blocking masalah oleh symptom
halaman stays blank sebelum appearing semua di once
mungkin cause: sebuah stylesheet atau synchronous head script adalah holding pertama paint. Fix: inspect document’s early permintaan chain, lalu defer non-critical JavaScript dan split atau reduce non-critical CSS. Confirm: sebuah baru trace paints berguna konten sebelum itu non-critical files finish.
defer melakukan not meningkatkan pertama paint
mungkin cause: CSS atau lainnya synchronous script adalah masih critical blocker, atau deferred script adalah not bottleneck. Fix: compare sebelum/setelah permintaan chain dan main-thread activity alih-alih assuming setiap script blocks rendering. Confirm: remaining critical path identifies next resource itu gates paint.
halaman flashes unstyled setelah deferring CSS
mungkin cause: styles needed untuk initial viewport adalah moved out dari critical path. Fix: pertahankan truly critical CSS available untuk pertama render dan defer hanya aturan not needed yet. Confirm: sebuah throttled filmstrip menampilkan styled konten dari pertama painted frame.
sebuah fix improves FCP tetapi membuat layout shifts
mungkin cause: deferred styles atau late component initialization perubahan geometry setelah paint. Fix: pertahankan sizing dan layout-critical aturan di initial render. Confirm: faster pertama paint remains dan Layout Shifts track menampilkan no baru instability.
audit flags sebuah berbeda resource pada next run
mungkin cause: consent-manager gating, ketiga-party tag muat order, CSP, service-worker caching, atau plain cache state changed what got ditemukan atau executed antara runs — sebuah single trace isn’t sebuah permanent classification. Fix: repeat trace di seluruh states itu penting (pertama visit vs. cached, consent accepted vs. declined) sebelum treating one run’s flagged resource sebagai fix target. Confirm: yang sama resource masih menampilkan sebagai dominant blocker di seluruh matched, repeated traces.
Simplified render-blocking contoh
Parser-blocking script versus deferred script
pertama script stops HTML parsing. kedua downloads di parallel dan waits until parsing adalah complete.
<!-- Blocks the parser -->
<script src="app.js"></script>
<!-- Better for a script that depends on the parsed document -->
<script defer src="app.js"></script>One stylesheet untuk setiap viewport versus conditional CSS
media attribute mempertahankan sebuah print-hanya stylesheet dari blocking screen render.
<link rel="stylesheet" href="screen.css">
<link rel="stylesheet" href="print.css" media="print">Critical styles sebelum deferred bundle
ini simplified pattern membuat kecil initial layout available immediately. Production implementations masih perlu testing untuk CSP, caching, dan flashes dari unstyled konten.
<style>
.site-header { min-height: 4rem; }
</style>
<link rel="stylesheet" href="site.css"> Prompt: classify critical resources
Paste sebuah DevTools Network export atau sebuah list dari document’s early CSS dan JavaScript permintaan.
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: review sebuah 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] List potentially blocking head resources
Paste ini ke DevTools Console. hasil adalah sebuah audit queue, not sebuah instruction untuk 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);temukan resources itu finished sebelum pertama 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 di ini list consumed time sebelum FCP, tetapi timing alone melakukan not prove itu sebuah resource blocked rendering. Confirm dengan trace dan dependency chain.
alat untuk finding render blockers
- PageSpeed Insights dan Lighthouse: identify render-blocking permintaan opportunities di sebuah repeatable lab run. Treat estimated savings sebagai sebuah lead alih-alih sebuah guarantee.
- Chrome DevTools performa panel: connect permintaan, HTML parsing, script execution, style calculation, dan pertama painted frame pada one timeline.
- Chrome DevTools Network panel: inspect permintaan priority, initiators, timing, protocol, cache perilaku, dan order di which critical files arrive.
- Chrome DevTools Coverage panel: temukan unused CSS dan JavaScript di recorded journey. Coverage dari one route adalah not permission untuk delete code digunakan elsewhere.
- WebPageTest: compare waterfalls dan filmstrips di bawah berbeda locations dan connection profiles.
berguna workflow adalah Lighthouse untuk clue, performa dan Network panels untuk cause, lalu sebuah throttled sebelum/setelah recording untuk proof.
Prove sebuah render-blocking fix worked
Deferred-script test
Test untuk run: record sebuah cold, throttled muat sebelum dan setelah menambahkan defer, lalu inspect parsing dan pertama paint. Expected hasil: HTML parsing continues while script downloads dan halaman masih initializes correctly setelah parsing. Failure interpretation: script depends pada immediate execution atau ordering adalah changed incorrectly. Monitoring window: immediate di repeated traces. Rollback trigger: missing konten, JavaScript errors, atau broken interactions.
Conditional-stylesheet test
Test untuk run: muat setiap relevant viewport dan media mode while recording Network dan performa panels. Expected hasil: non-matching CSS melakukan not delay screen’s pertama render, while matching layouts remain styled. Failure interpretation: critical aturan adalah placed di wrong bundle atau media condition adalah incomplete. Monitoring window: immediate di seluruh didukung breakpoints. Rollback trigger: unstyled konten, incorrect print output, atau baru layout shifts.
Critical-path comparison
Test untuk run: compare yang sama halaman, device profile, dan cold-cache conditions sebelum dan setelah perubahan, dan repeat setiap side dari comparison alih-alih relying pada sebuah single trace. Expected hasil: blocking chain dan FCP/LCP timing meningkatkan consistently di seluruh matched, repeated runs alih-alih di one lucky run. Failure interpretation: variance, lainnya bottleneck, atau sebuah runtime-state difference (consent state, ketiga-party tag timing, CSP, service-worker cache) menjelaskan apparent gain. Monitoring window: several controlled lab runs, diikuti oleh field monitoring. Rollback trigger: field LCP, CLS, errors, atau conversion perilaku worsens setelah release.
Test yourself: Render-Blocking Resources
Five quick pertanyaan pada render-blocking CSS dan JavaScript. Pick sebuah jawaban untuk setiap, lalu periksa.
Log perubahan
Diperbarui 27 Jul 2026.
Ringkasan editorial dan detail perubahan yang tercatat.Detail perubahan
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
Perbandingan lengkap tidak tersedia — tidak ada cuplikan sebelumnya yang diarsipkan untuk revisi ini.
Diperbarui 18 Jul 2026.
Ringkasan editorial dan detail perubahan yang tercatat.Detail perubahan
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
Perbandingan lengkap tidak tersedia — tidak ada cuplikan sebelumnya yang diarsipkan untuk revisi ini.