critical rendering path उन steps का क्रम है जिन्हें browser HTML, CSS, और JS को screen पर pixels में बदलने के लिए चलाता है। कुछ भी जो पहले paint से पहले पूरा होना चाहिए वह render-blocking है।
critical rendering path उन steps का क्रम है जिन्हें browser HTML, CSS, और JS को screen पर pixels में बदलने के लिए चलाता है। कुछ भी जो पहले paint से पहले पूरा होना चाहिए वह render-blocking है।
<script> download और run होते समय 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 इंटरव्यू प्रश्नों की एक लाइब्रेरी — जूनियर से सीनियर तक।
दान करें