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]
3269 questions
11086
votes
37 answers
What is the correct JSON content type?
I've been messing around with JSON for some time, just pushing it out as text and it hasn't hurt anybody (that I know of), but I'd like to start doing things properly.
I have seen so many purported "standards" for the JSON content…

Oli
- 225,853
- 62
- 212
- 293
1176
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
- 76,451
- 143
- 381
- 545
646
votes
63 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,031
- 6
- 45
- 89
549
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
- 19,546
- 11
- 60
- 87
517
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,246
- 14
- 55
- 75
455
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
- 8,990
- 10
- 48
- 116
361
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
- 8,956
- 10
- 46
- 64
344
votes
6 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
- 25,836
- 53
- 141
- 219
324
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,608
- 5
- 16
- 21
319
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,393
- 26
- 66
- 99
297
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
- 47,755
- 44
- 170
- 204
267
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,679
- 2
- 12
- 3
258
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,318
- 6
- 20
- 17
239
votes
11 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,195
- 18
- 69
- 108
212
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,695
- 15
- 50
- 81