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

偶尔善良 提交于 2019-12-02 17:23:21

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

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.

Stewart

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.

There is same problem with png:

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

;)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!