critical rendering path ही browser HTML, CSS, आणि JS ला screen वरील pixels मध्ये रूपांतरित करण्यासाठी चालवत असलेल्या steps ची क्रमवारी आहे. पहिल्या paint आधी जे पूर्ण व्हावेच लागते ते render-blocking असते.
critical rendering path ही browser HTML, CSS, आणि JS ला screen वरील pixels मध्ये रूपांतरित करण्यासाठी चालवत असलेल्या steps ची क्रमवारी आहे. पहिल्या paint आधी जे पूर्ण व्हावेच लागते ते render-blocking असते.
<script> download व चालत असताना HTML parsing थांबवते.<!-- Blocks parsing: browser waits here before continuing -->
<script src="/app.js"></script>
<!-- defer: download in parallel, run after HTML is parsed, in order -->
<script src="/app.js" defer></script>
<!-- async: download in parallel, run as soon as ready (order not guaranteed) -->
<script src="/analytics.js" async></script>
DOM ला स्पर्श करणाऱ्या app code साठी defer वापरा, आणि analytics सारख्या स्वतंत्र scripts साठी async. critical CSS inline करा आणि बाकीचे block न करता load करा.
हे जवळपास प्रत्येक load-time fix मागचे mental model आहे: render-blocking CSS/JS हे धीम्या first paint आणि खराब LCP चे प्रमुख कारण आहे. defer/async का अस्तित्वात आहेत हे जाणणे दर्शवते की तुम्हाला फक्त syntax नव्हे तर browser समजते.
सविस्तर उत्तरांसह IT मुलाखत प्रश्नांचे ग्रंथालय — Junior पासून Senior पर्यंत.
देणगी द्या