What is a MIME type?
By Mark Boreland ·
In short
- A MIME type is a short label, like application/pdf or image/png, that tells the browser what kind of file it is getting.
- It decides whether the browser shows the file inline or downloads it.
- A wrong MIME type is why a file sometimes downloads when you expected it to open.
A MIME type, also called a content type, is the label a server attaches to a file so the browser knows how to handle it. application/pdf tells the browser to render a document, image/png tells it to show a picture, and text/html tells it to display a page. The browser does not guess from the file extension alone; it trusts this header. Get it right and the file behaves as expected. Get it wrong and a PDF might download as a mystery blob instead of opening.
This is the mechanism behind whether a shared file opens in the browser or lands in the downloads folder. NudgeHost sets the correct MIME type for what you upload, so a document you put a PDF online opens inline and a recipient can the online PDF viewer without a download step. A page served as text/html renders, while a file the browser cannot display inline is offered as a download instead. The behaviour follows from the type, not from luck.
Most people never touch this, which is the point. It should just work. It becomes visible only when a file misbehaves, and the usual cause is a host serving the wrong type. Hosting on NudgeHost is free to start and drop a file to get started is where you drop the file in. The short version is that the MIME type is the difference between view and download, and it is handled for you.
Related terms
Frequently asked questions
Why does my file download instead of opening?
Either the browser cannot display that type inline, or the host served the wrong MIME type. NudgeHost sets the correct type so files that can open inline do.
Can I force a file to download rather than open?
Yes. A download option is offered alongside inline viewing, and the link can present the file as a download when that is what you want.
Is a MIME type the same as a file extension?
They are related but separate. The extension is part of the filename; the MIME type is the header the server sends, and the browser trusts the header.
Related tools
Other things you can do on NudgeHost.
Put it into practice.
Drop a file and get a shareable link in seconds. Free, no card needed.
Share a file now