navigator.mimeTypes is a read-only Navigator property that returns a MimeTypeArray (MDN). Modern engines hard-code the list: either application/pdf and text/pdf (inline PDF supported) or an empty list.
Read the notes below before you rely on this property. Prefer feature detection when support is limited.
Syntax
Use navigator.mimeTypes. Start with this line.
JavaScript
navigator.mimeTypes
Call
What it does
navigator.mimeTypes
Primary signature.
Built into the browser. Read navigator.mimeTypes on Navigator — no import required.
Library declarations
JavaScript
navigator.mimeTypes
Parameters
This member has no parameters beyond those shown in the signature.
length: 2
type: object
(or length: 0 when the PDF pair is not listed)
How It Works
Read the property. Returns a MimeTypeArray, not a plain array.
Check length. Modern browsers: 0 or 2.
Expect hard-coding. Not a full plugin inventory anymore.
Keep it read-only. You inspect; you do not assign.
Example 2 — Check application/pdf (MDN)
Use the in operator to see if the PDF MIME type is listed.
JavaScript
if ("application/pdf" in navigator.mimeTypes) {
console.log("PDF MIME type listed (inline PDF likely)");
} else {
console.log("application/pdf not in mimeTypes");
}
Use item(i). Classic MimeTypeArray accessor (or types[i]).
Read type. The MIME string for that entry.
Do not rely on for…in. Named properties are not enumerable on modern browsers.
Expect a short list. Legacy “many plugins” lists are gone in current specs.
Compatibility
Browser Support
navigator.mimeTypes is Baseline Widely available (MDN, since about July 2015). The MimeTypeArray interface is Deprecated; modern engines return a hard-coded PDF list or empty.
✓ Baseline · Widely available
Navigator.mimeTypes
Supported widely for years. Treat contents as hard-coded PDF metadata (or empty), and prefer pdfViewerEnabled for new checks.
98%Property availability
Google ChromemimeTypes · hard-coded PDF / empty
Full support
Microsoft EdgemimeTypes · Chromium
Full support
Apple SafarimimeTypes · modern versions
Full support
Mozilla FirefoxmimeTypes · modern versions
Full support
OperamimeTypes · modern versions
Full support
Internet ExplorerLegacy plugin MIME lists
Legacy support
navigator.mimeTypesExcellent
Bottom line: Safe to read for learning and legacy code. For product PDF decisions, use navigator.pdfViewerEnabled.
Frequently Asked Questions
A read-only MimeTypeArray of MimeType objects. On modern browsers the list is hard-coded: application/pdf and text/pdf when PDFs can display inline, or an empty list (MDN).
The Navigator.mimeTypes property is Baseline Widely available (since about July 2015) and not labeled Experimental or Non-standard on MDN. The MimeTypeArray interface is Deprecated — prefer navigator.pdfViewerEnabled for new PDF checks.
MDN pattern: if ("application/pdf" in navigator.mimeTypes). Checking text/pdf is equivalent on current browsers — both are present or both are absent.
For new code, use navigator.pdfViewerEnabled. MDN says do not infer inline PDF support from mimeTypes alone.
On the PDF MimeType entry they are hard-coded to “Portable Document Format” and “pdf”. Useful for demos; not required to detect PDF viewing.
No. It is read-only. You inspect the MimeTypeArray; you cannot assign a new list to navigator.mimeTypes.