MIME Types संदर्भ
| Extension | MIME type | के लिए उपयोग होता है |
|---|---|---|
| .html | text/html | Web pages |
| .css | text/css | Stylesheets |
| .js | text/javascript | JavaScript |
| .json | application/json | JSON data |
| .xml | application/xml | XML documents |
| .txt | text/plain | Plain text |
| .csv | text/csv | Comma-separated values |
| .md | text/markdown | Markdown |
| .png | image/png | PNG images |
| .jpg | image/jpeg | JPEG photos |
| .gif | image/gif | GIF images |
| .webp | image/webp | WebP images |
| .svg | image/svg+xml | SVG vector images |
| .ico | image/x-icon | Favicons |
| .avif | image/avif | AVIF images |
| .mp3 | audio/mpeg | MP3 audio |
| .wav | audio/wav | WAV audio |
| .ogg | audio/ogg | Ogg audio |
| .mp4 | video/mp4 | MP4 video |
| .webm | video/webm | WebM video |
| .mov | video/quicktime | QuickTime video |
| application/pdf | PDF documents | |
| .zip | application/zip | ZIP archives |
| .tar | application/x-tar | TAR archives |
| .gz | application/gzip | Gzip फ़ाइलें |
| .7z | application/x-7z-compressed | 7Z archives |
| .rar | application/vnd.rar | RAR archives |
| .doc | application/msword | Word (legacy) |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Word OOXML |
| .xls | application/vnd.ms-excel | Excel (legacy) |
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Excel OOXML |
| .ppt | application/vnd.ms-powerpoint | PowerPoint (legacy) |
| .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | PowerPoint OOXML |
| .woff | font/woff | Web fonts |
| .woff2 | font/woff2 | Web fonts v2 |
| .ttf | font/ttf | TrueType fonts |
| .otf | font/otf | OpenType fonts |
| .wasm | application/wasm | WebAssembly |
| .bin | application/octet-stream | Generic binary |
| .form / POST | application/x-www-form-urlencoded | HTML form submissions |
| .json API | application/ld+json | JSON-LD structured data |
हमारे बारे में
MIME type (media type) वह तरीका है जिससे server browser को बताता है कि फ़ाइल असल में क्या है — इस table से बना Content-Type header ही वह है जो .png को text के रूप में serve होने से या download को HTML में sniff होने से रोकता है (एक XSS vector, इसीलिए X-Content-Type-Options: nosniff मौजूद है)। Table रोज़मर्रा के web काम के formats को cover करती है। दो entries बार-बार bug पैदा करती हैं, याद रखने लायक: JavaScript text/javascript है (पुराना application/javascript deprecated है), और .svg image/svg+xml है — ग़लत serve होने पर SVG icons चुपचाप fail हो जाते हैं।
अक्सर पूछे जाने वाले सवाल
मेरी फ़ाइल display होने के बजाय download क्यों होती है?
Server ने application/octet-stream या ग़लत type भेजा, या Content-Disposition: attachment। Response headers को इस table के विरुद्ध जाँचें।
क्या extension authoritative है या header?
Header — browsers Content-Type पर act करते हैं (sniffing के साथ risky fallback के रूप में जिसे nosniff disable करता है)। Extensions सिर्फ़ server के लिए मायने रखती हैं जो header चुनता है।