Why does IE7 specify a mime-type of image/pjpeg rather than just image/jpeg?

Internet Explorer-7File UploadJpeg

Internet Explorer-7 Problem Overview


When uploading a file (jpeg) via a form in IE7 I am seeing a mime-type of "image/pjpeg" instead of "image/jpeg" (as I see in Firefox or similar). It's easy enough to work around this problem, but I'm just wondering why IE7 is behaving differently in this case?

Internet Explorer-7 Solutions


Solution 1 - Internet Explorer-7

I believe it's because the JPEG you're working with is a progressive JPEG, which has a different mime-type.

Solution 2 - Internet Explorer-7

IE can upload all .jpeg files as its hack MIME type 'image/pjpeg' regardless of whether or not they're actually progressive.

Don't rely on the MIME type supplied in a file upload, there is every chance it could be wrong for a variety of reasons including this one.

Solution 3 - Internet Explorer-7

Because Microsoft likes to violate standards. There's no such MIME type as image/pjpeg. See for yourself: http://www.iana.org/assignments/media-types/media-types.xhtml#image

The correct MIME type for JPEG is image/jpeg, progressive or not.

Solution 4 - Internet Explorer-7

There is same problem with png:

IE7: image/x-png Normal browsers: image/png

;)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJohn MontgomeryView Question on Stackoverflow
Solution 1 - Internet Explorer-7Pseudo MasochistView Answer on Stackoverflow
Solution 2 - Internet Explorer-7bobinceView Answer on Stackoverflow
Solution 3 - Internet Explorer-7StewartView Answer on Stackoverflow
Solution 4 - Internet Explorer-7h-techView Answer on Stackoverflow