mime-type
यह क्या करती है
यह स्किल उन content type headers की जाँच करती है जो सर्वर HTML, CSS, JavaScript, तस्वीरों और फ़ॉन्ट्स के साथ भेजता है। यह उन लोगों के लिए है जो वेब सर्वर संभालते हैं या टूटे पेज संसाधनों की जाँच करते हैं।
कब इस्तेमाल करें
- ✓जब आप एजेंट से जाँचवाना चाहते हैं कि आपका सर्वर सही फ़ाइल प्रकार भेज रहा है या नहीं।
- ✓जब कोई स्टाइलशीट या स्क्रिप्ट लोड नहीं होती और आपको शक है कि content type गलत है।
- ✓जब आप नई होस्टिंग या नया फ़्रेमवर्क सेट करते हैं और पक्का करना चाहते हैं कि उसके headers सही हैं।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/mime-type/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी साइट पर CSS लोड नहीं हो रही। क्या आप जाँच सकते हैं कि सर्वर सही content type भेज रहा है या नहीं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट मुख्य पेजों और जुड़ी फ़ाइलों के response headers देखता है। वह हर एक की तुलना अपेक्षित प्रकार से करता है, जैसे स्टाइलशीट के लिए text/css, और जहाँ मेल नहीं खाता वहाँ सर्वर बदलाव सुझाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
MIME Type Validation
Incorrect MIME types cause browsers to block stylesheets and scripts (MIME sniffing is disabled by X-Content-Type-Options: nosniff), breaking page rendering and signalling poor site quality to crawlers.
Quick Reference
- The Content-Type header must match the actual file type being served
- HTML pages must be served as text/html; charset=utf-8
- CSS files must be served as text/css and JavaScript as text/javascript
- Incorrect MIME types cause browsers to block or mishandle resources
Check
For key pages and their linked resources, inspect the HTTP Content-Type response header. Verify HTML responses use text/html; charset=utf-8, CSS uses text/css, JS uses text/javascript, and images use image/jpeg, image/png, etc.
Fix
Update your server configuration to serve each file type with its correct MIME type. Set X-Content-Type-Options: nosniff to prevent browsers from guessing content types. In Next.js and similar frameworks, configure headers in next.config.js.
Explain
The Content-Type header tells browsers and crawlers what kind of content is being sent. When it mismatches the actual file type, browsers either block the resource or render it incorrectly—CSS served as text/plain won't be applied, and JavaScript served as text/html may be blocked by strict MIME checking.
Code Review
For HTML, CSS, and JS assets, check the Content-Type response header. Verify HTML responses include 'charset=utf-8'. Check that X-Content-Type-Options: nosniff is set. Flag any resource returning Content-Type: text/html that is not an HTML page. Check for missing charset declarations on text responses.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
अक्सर पूछे जाने वाले सवाल
content type गलत होने पर क्या होता है?
ब्राउज़र फ़ाइल को रोक सकते हैं या गलत तरीके से दिखा सकते हैं, इसलिए स्टाइलशीट बिल्कुल लागू न हो।
nosniff क्या करता है?
X-Content-Type-Options header ब्राउज़र को प्रकार का अंदाज़ा लगाने से रोकता है, ताकि वह सर्वर के भेजे मान पर भरोसा करे।
Next.js में यह कैसे सेट होता है?
स्किल next.config.js फ़ाइल में headers कॉन्फ़िगर करने का सुझाव देती है।
जानकारी
लेखक का मूल विवरण
Use when auditing server configuration or diagnosing broken resources. Applies to any web server serving HTML, CSS, JS, images, fonts, or other static assets.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2938
- लाइसेंस
- 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
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।