Critical rendering Path

browser's langkah-oleh-langkah pipeline dari bytes untuk terlihat pixels — DOM, CSSOM, render tree, layout, dan paint — mengapa CSS dan JavaScript block rendering, three optimization levers, dan bagaimana ini drives FCP, LCP, dan Googlebot rendering. hub untuk render-blocking resources.

Pertama kali diterbitkan: 26 Jun 2026 · Terakhir diperbarui: 22 Agu 2026 · Lanjutan

critical rendering path (CRP) adalah dependency-ordered berfungsi sebuah browser melakukan sebelum ini dapat paint pertama pixel: parse HTML ke DOM, parse CSS ke CSSOM, combine them ke sebuah render tree, jalankan layout, lalu paint — sebuah berguna mental model, tidak sebuah rigid satu-shot schedule. Dua hal block ini differently — CSS blocks painting ketika ini applies ( browser tidak akan render until CSSOM adalah dibangun), dan synchronous JavaScript blocks DOM parsing ( parser berhenti dead di setiap script). Optimizing CRP berarti minimizing three variables: angka dari critical resources, critical path length (network round trips), dan critical bytes. FCP tracks CRP completion (sebuah milestone, tidak sebuah penuh diagnosis), dan sebuah panjang CRP dapat delay LCP too — keduanya adalah Core Web Vitals. ini penting untuk Googlebot sebagai well: Web rendering Service menggunakan sebuah stateless, cold-cache headless Chromium, so blocking resources slow -nya rendering similarly untuk sebuah nyata browser's (tepat equivalence dan peringkat impact tidak proven oleh itu alone), dan critical CSS/JS harus tidak menjadi blocked di robots.txt. ini hub menjelaskan pipeline dan poin down untuk render-blocking resources.

TL;DR — critical rendering path adalah browser’s pipeline dari bytes untuk pertama paint: HTML → DOM, CSS → CSSOM, DOM + CSSOM → render tree → layout → paint. Dua distinct blocks: CSS blocks rendering (Tidak paint until CSSOM adalah dibangun) dan synchronous JavaScript blocks DOM construction ( parser berhenti di setiap script). mengoptimalkan oleh minimizing three variables — critical resources, critical path length (round trips), dan critical bytes. FCP tracks CRP completion (ini adalah sebuah milestone, tidak sebuah penuh diagnosis); sebuah besar TTFB-untuk-FCP delta sinyal render-blocking assets, dan sebuah panjang CRP dapat delay LCP too. Googlebot’s Web rendering Service berjalan sebuah stateless, effectively cold-cache headless Chromium, so blocking resources slow -nya rendering yang sama cara mereka’d slow sebuah nyata browser’s — dan critical CSS/JS harus tidak menjadi blocked di robots.txt. Levers: inline critical CSS, async non-critical CSS melalui media kueri, defer JS, dan preload (hanya untuk resources Anda’ve confirmed adalah pada critical path).

five-langkah pipeline (bytes untuk pixels)

setiap halaman — static HTML atau sebuah berat JS app — walks melalui yang sama explanatory model, di dependency order: setiap langkah bergantung pada satu sebelum ini. browser jangan secara harfiah jalankan ini sebagai five rigid, satu-shot phases, though. HTML adalah parsed dan dirender progressively sebagai bytes stream di, dan mesin dapat pipeline, overlap, atau rerun bagian dari ini berfungsi sebagai baru HTML, CSS, atau DOM perubahan arrive. Treat ini sebagai sebuah berguna mental model untuk reasoning tentang dependencies, tidak sebuah guaranteed universal mesin schedule.

1. HTML → DOM. web.dev mendeskripsikan object-model construction sebagai “Bytes → characters → tokens → nodes → object model.” (terjemahan) “Bytes → characters → tokens → nodes → object model.” browser “membaca itu mentah bytes dari HTML off itu disk atau network, dan translates them untuk individual characters,” (terjemahan) “membaca mentah bytes dari HTML off disk atau network, dan translates them untuk individual characters,” tokenizes them, converts tokens ke objects, dan tautan them ke sebuah tree. “Itu akhir output dari ini entire proses adalah itu Document Object Model (DOM) dari our simple halaman, yang itu browser menggunakan untuk all further processing.” (terjemahan) “ akhir output dari ini entire proses adalah Document Object Model (DOM) dari kami sederhana halaman, yang browser menggunakan untuk semua further processing.”

2. CSS → CSSOM. CSS berjalan tepat sama path: “Itu CSS bytes adalah converted menjadi characters, lalu tokens, lalu nodes, dan finally they adalah linked menjadi a tree structure known sebagai itu ‘CSS Object Model’ (CSSOM).” (terjemahan) “ CSS bytes adalah converted ke characters, lalu tokens, lalu nodes, dan finally mereka adalah ditautkan ke sebuah tree structure known sebagai ‘CSS Object Model’ (CSSOM).” Crucially, “Itu CSSOM dan DOM adalah independent data structures” (terjemahan) “ CSSOM dan DOM adalah independent data structures” — dua terpisah trees dibangun di parallel.

3. DOM + CSSOM → render tree. “Itu DOM dan CSSOM trees combine untuk form itu render tree,” (terjemahan) “ DOM dan CSSOM trees combine untuk form render tree,” yang “captures all the visible DOM content on the page.” (terjemahan) “captures semua terlihat DOM konten pada halaman.” ini adalah juga di mana display: none vs visibility: hidden penting: display: none menghapus sebuah element dari render tree entirely; visibility: hidden mempertahankan ini di tree (ini masih takes up space di layout) tetapi draws tidak ada apa pun.

4. Layout. “Layout computes the exact position and size of each object.” (terjemahan) “Layout computes tepat position dan size dari setiap object.” output adalah “a ‘box model,’ which precisely captures the exact position and size of each element within the viewport.” (terjemahan) “sebuah ‘box model,’ yang precisely captures tepat position dan size dari setiap element di dalam viewport.”

5. Paint. “The last step is paint, which takes in the final render tree and renders the pixels to the screen.” (terjemahan) “ terakhir langkah adalah paint, yang takes di akhir render tree dan renders pixels untuk screen.”

6. Composite dan display. Painted layers mendapatkan combined (composited) dan hasil adalah drawn untuk screen — langkah itu sebenarnya membuat pixels terlihat. beberapa CSS properties (like transform dan opacity) dapat rerun hanya ini langkah tanpa redoing layout atau paint, yang adalah mengapa mereka’re cheaper untuk animate.

Bukti untuk klaim ini The browser constructs the DOM and CSSOM, combines them into a render tree, performs layout, and paints pixels. Cakupan: web.dev explanation of the browser's critical rendering path. Tingkat keyakinan: tinggi · Diverifikasi: web.dev: Constructing the object model

critical rendering path adalah bagian dari ini pipeline itu memiliki untuk menyelesaikan sebelum pertama paint. sebagai web.dev puts ini, optimizing ini adalah “all tentang understanding apa happens di ini intermediate steps antara receiving itu HTML, CSS, dan JavaScript bytes dan itu wajib processing untuk turn them menjadi dirender pixels.” (terjemahan) “semua tentang understanding apa happens di ini intermediate langkah antara receiving HTML, CSS, dan JavaScript bytes dan diperlukan processing untuk turn them ke dirender pixels.”

Dua jenis dari blocking, dua berbeda mechanisms

ini adalah pembedaan sebagian besar SEO tulis-ups blur, dan ini adalah worth getting persis right.

CSS blocks rendering (painting) — ketika ini applies. “By default, CSS is treated as a render-blocking resource, which means that the browser won’t render any processed content until the CSSOM is constructed.” (terjemahan) “oleh default, CSS adalah treated sebagai sebuah render-blocking resource, yang berarti itu browser tidak akan render apa pun processed konten until CSSOM adalah constructed.” Keduanya HTML dan CSS adalah render-blocking; browser blocks rendering until ini memiliki keduanya DOM dan CSSOM. itu’s benar untuk stylesheets itu sebenarnya apply untuk saat ini environment — sebuah <link> milik siapa media condition tidak match (say, media="print" pada sebuah wajar screen visit) tidak render-blocking, though browser masih downloads ini. dan applicability tidak locked di di muat time: sebuah stylesheet itu tidak block awal render dapat mulai applying kemudian jika media condition, viewport, atau DOM perubahan, yang triggers lainnya round dari style/layout/paint berfungsi. So bahkan sebuah single slow, applicable stylesheet di <head> holds entire pertama paint hostage. ini adalah satu orang forget — mereka obsess di atas scripts dan ignore CSS.

«JavaScript blocks DOM construction (parsing). From Google’s PageSpeed docs: “whenever the parser encounters a script it has to stop and execute it before it can continue parsing the HTML,” and “in the case of an external script the parser is also forced to wait for the resource to download.” The net effect: “By default JavaScript blocks DOM construction and thus delays the time to first render.” A parser stall doesn’t mean the network goes idle, though — browsers run a secondary preload scanner that keeps discovering and fetching upcoming resources (images, other scripts, stylesheets) while the main parser is stuck on a script. The fix for the block itself is async/defer — but note async only removes the download block; the script still executes on the main thread when it arrives, so defer (which waits until parsing finishes and preserves order) is usually safer for the CRP.

Bukti untuk klaim ini CSS is render-blocking by default, while parser-blocking scripts stop DOM construction until execution completes. Cakupan: Default stylesheet and synchronous script behavior in the critical rendering path. Tingkat keyakinan: tinggi · Diverifikasi: web.dev: Render-blocking CSS web.dev: Adding interactivity with JavaScript

» (Terjemahan) (Ringkasan bahasa Indonesia untuk bagian tiga puluh satu, bagian kecil satu: teks sumber dipertahankan agar dapat diperiksa dalam tinjauan penutur asli.)

three optimization levers

web.dev frames CRP optimization sebagai minimizing three variables: “To deliver the fastest possible time to first render, we need to minimize three variables: The number of critical resources. The critical path length. The number of critical bytes.” (terjemahan) “Untuk memberikan waktu secepat mungkin menuju render pertama, kita perlu meminimalkan tiga variabel: jumlah resource kritis, panjang jalur kritis, dan jumlah byte kritis.” Sebuah “A critical resource is a resource that could block initial rendering of the page.” (terjemahan) “Resource kritis adalah resource yang dapat memblokir rendering awal halaman.”

  • Reduce angka dari critical resources — eliminate them, defer mereka download, atau mark them async. Fewer hal itu harus finish sebelum pertama paint.
  • Reduce critical path length — “a function of the dependency graph between the critical resources.” (terjemahan) “sebuah function dari dependency graph antara critical resources.” Fewer network round trips untuk fetch chain.
  • Reduce critical bytes — “the fewer critical bytes the browser has to download, the faster it can process content.” (terjemahan) “ fewer critical bytes browser memiliki untuk download, lebih cepat ini dapat proses konten.” Minify, compress, dan split.

dalam praktik itu berarti: inline critical (di atas—fold) CSS di <head> dan muat penuh stylesheet asynchronously; cakupan non-critical CSS dengan media kueri (<link rel="stylesheet" media="print"> downloads tetapi tidak block paint); defer non-essential JavaScript; dan preload resources Anda know Anda’ll perlu. ini adalah persis LCP advice I memberikan di my Ahrefs LCP guide — “Anda ingin untuk rearrange itu order di yang itu resources adalah downloaded dan processed” (terjemahan) “Anda ingin rearrange order di yang resources adalah downloaded dan processed” — dan inlining critical CSS “takes itu part dari itu CSS needed untuk load itu konten users see immediately dan lalu applies it secara langsung menjadi itu HTML.” (terjemahan) “takes bagian dari CSS needed untuk muat konten pengguna see immediately dan lalu applies ini secara langsung ke HTML.” I hanya tidak pernah called ini “itu critical rendering path” (terjemahan) “ critical rendering path” oleh name; itu’s mechanism underneath.

Preload dan fetchpriority melakukan berbeda jobs — jangan conflate them. preload forces browser untuk fetch sebuah resource early, sebelum ini akan jika tidak menjadi ditemukan — berguna untuk resources hidden di CSS atau JavaScript itu HTML parser dapat’t see coming. fetchpriority tidak fetch apa pun; ini hanya perubahan priority hint pada sebuah permintaan browser adalah sudah going untuk membuat. Neither adalah free: sebuah preload dengan wrong URL, as jenis, atau credentials mode dapat go unused atau duplicate sebuah permintaan browser membuat anyway, dan marking too banyak resources tinggi-priority hanya erases ordering benefit — browser, CDN, dan protocol perilaku semua memengaruhi bagaimana banyak ini sebenarnya helps. gunakan preload hanya untuk sebuah resource Anda’ve confirmed, dengan sebuah waterfall, sits pada critical path untuk halaman Anda’re testing — dan verify sebelum/setelah dengan lainnya trace alih-alih assuming win.

Core Web Vitals connection ( SEO angle)

ini adalah mengapa CRP tidak sebuah developer-hanya concern.

«- FCP tracks CRP completion, but it’s a milestone, not a full diagnosis. First Contentful Paint fires when the browser paints the first content, so a long critical rendering path tends to show up as a late FCP. But FCP is one observed paint event — it doesn’t by itself tell you which stage of the pipeline caused the delay, and a fast FCP doesn’t guarantee every dependency finished cleanly. Treat a late FCP as a signal that something on the path is slow, then go trace what.

  • LCP can inherit the delay. Abby Hamilton (Dentsu) puts it well: “Optimizing the critical rendering path will typically have the largest impact on Largest Contentful Paint (LCP) since it’s specifically focused on how long it takes for pixels to appear on the screen.” web.dev gives you the diagnostic: “A large delta between TTFB and FCP could indicate that the browser needs to download a lot of render-blocking assets.” That delta is a CRP smell test, not a root-cause finding — confirm it with a waterfall or trace before you fix anything.
  • TBT/INP feel the JavaScript. Scripts on the critical path compete for the main thread; long tasks after paint hurt interactivity. » (Terjemahan) (Ringkasan bahasa Indonesia untuk bagian tiga puluh sembilan, bagian kecil satu: teks sumber dipertahankan agar dapat diperiksa dalam tinjauan penutur asli.)

Keduanya LCP dan FCP adalah shaped oleh bagaimana fast browser mendapatkan melalui path, dan LCP adalah sebuah Core Web Vital Google menggunakan sebagai sebuah sinyal peringkat — itu’s tautan antara sebuah internals topic dan penelusuran. Field outcomes dan apa pun spesifik peringkat effect masih perlu mereka own evidence (CrUX/Search Console data), tidak hanya sebuah fast lab trace.

Bagaimana Googlebot adalah affected

«Google’s Web Rendering Service (WRS) is the part that trips people up. Google “processes JavaScript web apps in three main phases: Crawling, Rendering, Indexing,” and “Once Google’s resources allow, a headless Chromium renders the page and executes the JavaScript” using “an evergreen version of Chromium.” Same rendering engine as a real Chrome — which means blocking resources slow down Googlebot’s rendering too, the same way they’d slow down a real browser. That’s a reasonable inference from shared architecture, not a claim that every delay affects Googlebot identically to every user or that it translates directly into an indexing or ranking penalty — Google hasn’t published that level of equivalence, and confirming it for a specific page needs Search Console / indexing evidence, not just a CRP audit. » (Terjemahan) (Ringkasan bahasa Indonesia untuk bagian empat puluh dua, bagian kecil satu: teks sumber dipertahankan agar dapat diperiksa dalam tinjauan penutur asli.)

Three consequences worth internalizing:

«- The render queue adds lag. Pages wait “a few seconds, but it can take longer than that” in the rendering queue. A slow CRP compounds that delay.

  • WRS is stateless and effectively cold-cache. As I describe it in my JavaScript SEO guide, “Google loads each page stateless like it’s a fresh load.” Google’s own docs confirm WRS doesn’t retain state across page loads and “may ignore caching headers,” which “may lead WRS to use outdated JavaScript or CSS resources.” So you can’t lean on a warm cache to hide a heavy critical path — every render is essentially a first visit. (This also busts the “Google caches resources, so CRP only matters on the first visit” myth.)
  • Don’t block critical resources in robots.txt. WRS needs your CSS and JS to render correctly. As I put it in my JavaScript SEO guide: “Don’t block access to resources if they are needed to build part of the page or add to the content.” Block them and you can break rendering entirely — Google sees a broken page. » (Terjemahan) (Ringkasan bahasa Indonesia untuk bagian empat puluh empat, bagian kecil satu: teks sumber dipertahankan agar dapat diperiksa dalam tinjauan penutur asli.)

Bing memiliki Tidak equivalent “critical rendering path” (terjemahan) “critical rendering path” doc series, tetapi principle adalah universal untuk apa pun browser-based crawler, dan Bingbot’s JS-rendering budget adalah lebih constrained daripada Google’s — yang membuat sebuah lean critical path penting lebih untuk Bing penemuan, tidak lebih sedikit.

Satu edge case: sebuah early paint tidak prove Anda konten adalah di sana

CRP model mendeskripsikan getting sesuatu pada screen — ini tidak promise itu sesuatu adalah Anda sebenarnya konten. Client-dirender apps sering paint sebuah shell (skeleton, memuat state, empty layout) quickly, yang satisfies FCP, sementara konten readers dan Googlebot sebenarnya care tentang adalah masih menunggu pada sebuah JavaScript bundle untuk download, execute, dan fetch data. sebuah fast FCP pada sebuah halaman like itu adalah sebuah salah sinyal — critical rendering path finished untuk shell, tidak untuk konten.

server-dirender atau statically generated HTML mostly menghindari ini karena bermakna konten adalah sudah di awal markup alih-alih injected kemudian. jika Anda’re auditing sebuah JS-berat halaman, jangan berhenti di FCP: periksa apa sebenarnya terlihat pada screen di itu timestamp (sebuah filmstrip atau trace menampilkan ini) versus ketika utama konten becomes terlihat, dan treat itu sebagai dua berbeda pertanyaan.

Di mana SEOs sebenarnya memenuhi CRP

paling umum touchpoint adalah PageSpeed Insights / Lighthouse “Eliminate render-blocking resources” (terjemahan) “Eliminate render-blocking resources” audit. sebagai Abby Hamilton mendeskripsikan workflow: “navigate to ‘Eliminate render-blocking resources’ under ‘Diagnostics,’ and expand the content to see a list of first-party and third-party resources blocking the first paint.” (terjemahan) “navigate untuk ‘Eliminate render-blocking resources’ di bawah ‘Diagnostics,’ dan expand konten untuk see sebuah list dari pertama-party dan ketiga-party resources blocking pertama paint.” di WebPageTest, baca waterfall dan temukan apa pun memuat sebelum “Start Render” (terjemahan) “Mulai Render” line; di Chrome DevTools, Coverage tab menampilkan unused CSS/JS Anda dapat defer. Satu caution pada apa pun single trace: ketiga-party connection setup, consent-gated scripts, sebuah service worker, atau sebuah warm versus cold cache dapat semua perubahan apa mendapatkan ditemukan dan ketika antara berjalan — sebuah single lab lulus adalah sebuah sample, tidak sebuah jaminan dari apa setiap pengunjung sees.

ini halaman adalah hub untuk render-blocking berfungsi. deep dive sits di bawah ini:

  • Render-blocking resources — practical, audit-driven companion untuk ini halaman: persis cara temukan blocking CSS dan JavaScript di PageSpeed Insights, Lighthouse, dan WebPageTest, perbedaan antara async dan defer di detail, inlining critical CSS, scoping stylesheets dengan media kueri, dan memperbaiki “Eliminate render-blocking resources” (terjemahan) “Eliminate render-blocking resources” warning langkah oleh langkah.

untuk metrics ini path drives, see Core Web Vitals, Largest Contentful Paint (LCP), dan pertama Contentful Paint (FCP). untuk bagaimana Googlebot’s rendering langkah berfungsi sebagai bagian dari bigger pipeline, see JavaScript SEO dan Bagaimana Penelusuran berfungsi cluster.

Tambahkan catatan pakar

Sematkan kutipan pakar

Orang baru? Buat profilnya yang belum diklaim di /admin/experts/ → Sematkan kutipan pakar terlebih dahulu.