defer-async
यह क्या करती है
यह स्किल जाँचती है कि वेब पेज के HTML में स्क्रिप्ट कैसे लोड होती हैं। यह पेज जल्दी दिखाने चाहने वाले डेवलपर के लिए है।
कब इस्तेमाल करें
- ✓जब स्क्रिप्ट डाउनलोड होते समय पेज खाली स्क्रीन दिखाता है।
- ✓जब head में स्क्रिप्ट टैग पहले दृश्य को धीमा करते हैं।
- ✓जब आप धीमे कनेक्शन पर पेज जल्दी दिखना शुरू करना चाहते हैं।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/defer-async/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे पेज के स्क्रिप्ट टैग जाँच सकते हैं, ताकि वे लोडिंग को धीमा न करें?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट ऐसे स्क्रिप्ट टैग खोजता है जो पेज को रोकते हैं, और जहाँ सुरक्षित हो वहाँ defer या async जोड़ता है। वह उपयुक्त स्क्रिप्ट को module प्रकार में भी बदल सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Load scripts with defer, async, or type=module
A plain <script> tag in the document head blocks all HTML parsing until the script downloads, parses, and executes. On a slow network this can add seconds of white-screen time before any content renders. defer and async allow the browser to continue parsing HTML while the script downloads, reducing Time to First Contentful Paint dramatically.
Quick Reference
- defer downloads in parallel and executes after HTML parsing, in order — use for most scripts
- async downloads in parallel and executes immediately when ready — use for independent scripts
- type=module always defers and enables ES module syntax
- Never place scripts in <head> without defer or async
Check
Find all script tags in this HTML file. Flag any in the <head> without defer or async, and any at the bottom of <body> that could be in <head> with defer.
Fix
Add defer or async to script tags in the document head, or convert to type=module where ES modules are used.
Explain
Explain the difference between defer, async, and type=module script loading, and when to use each.
Code Review
Review templates, server-rendered HTML, and shared components that output markup related to Load scripts with defer, async, or type=module. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/html/defer-async
अक्सर पूछे जाने वाले सवाल
defer और async में क्या अंतर है?
Defer पेज पढ़े जाने के बाद स्क्रिप्ट को क्रम से चलाता है। Async हर स्क्रिप्ट को आते ही चलाता है, किसी तय क्रम के बिना।
मुझे कौन-सा इस्तेमाल करना चाहिए?
स्किल ज़्यादातर स्क्रिप्ट के लिए defer और स्वतंत्र स्क्रिप्ट के लिए async की सिफ़ारिश करती है।
क्या यह फ़्रेमवर्क साइटों पर लागू होता है?
स्किल कहती है कि सिर्फ़ सोर्स टेम्पलेट नहीं, बल्कि ब्राउज़र को मिलने वाले अंतिम HTML की जाँच करें।
जानकारी
लेखक का मूल विवरण
Use when reviewing templates, rendered HTML, or shared components related to Load scripts with defer, async, or type=module. Validate the final browser-facing markup, not just the source framework abstraction.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2812
- लाइसेंस
- MIT
- अपडेट की गई
- 31/10/2026
कमेंट
- …
इस repository की और skills
frontendchecklist
75kकमांड-लाइन टूल से फ़्रंटएंड कोड और लाइव पेजों को एक्सेसिबिलिटी, स्पीड, SEO और सिक्योरिटी के 380 से ज़्यादा नियमों से जाँचती है।
frontend-checklist-global
75kफ़्रंटएंड प्रोजेक्ट को Front-End Checklist के सभी 386 नियमों से ऑडिट करती है, और हर मिली समस्या का ठोस समाधान देती है।
404-page
75kजाँचती है कि आपका गुम पेज उपयोगी लिंक देता है और सही 404 स्टेटस लौटाता है, ताकि भटके हुए विज़िटर रास्ता ढूँढ सकें।
about-page
75kजाँचती है कि आपकी साइट पर एक साफ़ About पेज है जो बताता है कि उसे कौन चलाता है, ताकि विज़िटर और सर्च इंजन का भरोसा बढ़े।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।