Proper MIME media type for PDF files

content-typehttp-headersmimepdf

When working with PDFs, I've run across the MIME types application/pdf and application/x-pdf among others.

Is there a difference between these two types, and if so what is it? Is one preferred over the other?

I'm working on a web app which must deliver huge amounts of PDFs and I want to do it the correct way, if there is one.

Best Answer

The standard Media Type (formerly known as MIME types) is application/pdf. The assignment is defined in RFC 3778, The application/pdf Media Type, referenced from the Media Types registry.

Media Types are controlled by a standards body, The Internet Assigned Numbers Authority (IANA). This is the same organization that manages the root name servers and the IP address space.

The use of x-pdf predates the standardization of the Media Type for PDF. Media Types in the x- namespace are considered experimental, just as those in the vnd. namespace are considered vendor-specific. x-pdf might be used for compatibility with old software.