An Internet media type or MIME type (named for Multipurpose Internet Mail Extensions) is a two-part identifier for file formats on the Internet.
Questions tagged [mime-types]
3331 questions
11267
votes
38 answers
Which JSON content type do I use?
There are many "standards" for the JSON content type:
application/json
application/x-javascript
text/javascript
text/x-javascript
text/x-json
Which one do I use, and where? I assume security and browser support issues are a factor.
Related: What…

Oli
- 230,670
- 62
- 217
- 294
1218
votes
9 answers
What is a correct MIME type for .docx, .pptx, etc.?
For older *.doc documents, this was enough:
header("Content-Type: application/msword");
What MIME type should I use for new .docx documents? Also, for pptx and xlsx documents?

Richard Knop
- 78,133
- 145
- 387
- 546
693
votes
65 answers
Stylesheet not loaded because of MIME-type
I'm working on a website that uses gulp to compile and browser sync to keep the browser synchronised with my changes.
The gulp task compiles everything properly, but on the website, I'm unable to see any style, and the console shows this error…

Nick
- 12,603
- 6
- 48
- 94
573
votes
5 answers
What MIME type should I use for CSV?
I've seen application/csv used and also text/csv.
Is there a difference? Does it matter which as long as the request matches something that's available? Are they interchangeable?

Steve Dunn
- 20,184
- 11
- 60
- 87
531
votes
3 answers
What is correct content-type for excel files?
I want excel files on a website to open in Excel when clicked, not get saved on desktop, or get opened embedded in a browser etc. Now obviously it all depends on how everything is configured for each user, but what's the best Content-Type and other…

taw
- 17,533
- 14
- 56
- 76
486
votes
4 answers
Is the MIME type 'image/jpg' the same as 'image/jpeg'?
Pretty simple question but can't seem to find it anywhere online. I'm trying to make a program that depending on the file type will give me the extension.

Joe Scotto
- 9,872
- 12
- 54
- 124
367
votes
8 answers
File input 'accept' attribute - is it useful?
Implementing a file upload under html is fairly simple, but I just noticed that there is an 'accept' attribute that can be added to the tag.
Is this attribute useful as a way of limiting file uploads to images, etc? What is…

Darren Oster
- 9,076
- 10
- 47
- 65
355
votes
7 answers
What does "Content-type: application/json; charset=utf-8" really mean?
When I make a POST request with a JSON body to my REST service I include Content-type: application/json; charset=utf-8 in the message header. Without this header, I get an error from the service. I can also successfully use Content-type:…

DenaliHardtail
- 26,446
- 53
- 146
- 223
333
votes
6 answers
What is a MIME type?
I have been reading about how to build plug-ins and this "MIME type" keeps getting discussed in it. I have tried to look into it and know that it is Multipurpose Internet Mail Extensions (MIME) but no suitable explanation of how it relates to…

Mohsin Sheikh Khalid
- 3,696
- 5
- 18
- 21
318
votes
20 answers
Chrome says "Resource interpreted as script but transferred with MIME type text/plain.", what gives?
In FF and all, my javascript works fine. But in Chrome it gives this message:
Resource interpreted as script but transferred with MIME type text/plain.
I have checked all the script tags and they all have the MIME type="text/javascript". It even…

Shaoz
- 10,443
- 26
- 69
- 100
301
votes
4 answers
Proper MIME type for .woff2 fonts
Today I updated Font Awesome package to 4.3.0 and noticed that woff2 font was added. That file is linked in CSS so I need to configure nginx to serve woff2 files properly.
Currently I have this block in nginx config for fonts:
location ~*…

Limon Monte
- 49,840
- 44
- 174
- 209
278
votes
4 answers
Which MIME type to use for a binary file that's specific to my program?
My program uses its own binary file type, so I assume I can't use MIME type text/plain, as it is not a 7-bit ASCII file.
Should I just call it "application/myappname"?

Powerbook165c
- 2,789
- 2
- 13
- 3
262
votes
20 answers
Using .NET, how can you find the mime type of a file based on the file signature not the extension
I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to this question only in .Net.

Richard Gourlay
- 5,408
- 6
- 21
- 17
253
votes
12 answers
How to check file MIME type with JavaScript before upload?
I have read this and this questions which seems to suggest that the file MIME type could be checked using JavaScript on client side. Now, I understand that the real validation still has to be done on server side. I want to perform a client side…

Question Overflow
- 10,465
- 18
- 71
- 108
219
votes
1 answer
Right mime type for SVG images with fonts embedded
This is the usual SVG mime type:
image/svg+xml
And it works great. However, when embedding an SVG font, chrome tells you the mime type is incorrect, obviously because you return a font instead of an image.
Is there any universal mime type? is…

cmplieger
- 6,865
- 15
- 52
- 81