MIME类型"image/jpg"是否与"image/jpeg"相同? [英] Is the MIME type 'image/jpg' the same as 'image/jpeg'?

查看:316
本文介绍了MIME类型"image/jpg"是否与"image/jpeg"相同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个非常简单的问题,但似乎无法在网上找到它.我正在尝试制作一个程序,该程序根据文件类型为我提供扩展名.

Pretty simple question but can't seem to find it anywhere online. I'm trying to make a program that depending on the file type will give me the extension.

推荐答案

否,image/jpgimage/jpeg不同,只有image/jpeg被识别为JPEG文件的实际mime类型.

No, image/jpg is not the same as image/jpeg, only image/jpeg is recognised as the actual mime type for JPEG files.

请参见 https://tools.ietf.org/html/rfc3745 https://www.w3.org/Graphics/JPEG/.

向IE提供错误的image/jpg内容类型可能会导致问题,请参见

Serving the incorrect Content-Type of image/jpg to IE can cause issues, see http://www.bennadel.com/blog/2609-internet-explorer-aborts-images-with-the-wrong-mime-type.htm.

这篇关于MIME类型"image/jpg"是否与"image/jpeg"相同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆