Right mime type for SVG images with fonts embedded

This is the usual SVG mime type:

image/svg+xml

And it works great. However, when embedding an SVG font, chrome tells you the mime type is incorrect, obviously because you return a font instead of an image.

Is there any universal mime type? is chrome wrong? is application/svg+xml accepted somehow?

I guess this is still a gray area in HTML5 but someone here might know.


There's only one registered mediatype for SVG, and that's the one you listed, image/svg+xml . You can of course serve SVG as XML too, though browsers tend to behave differently in some scenarios if you do, for example I've seen cases where SVG used in CSS backgrounds fail to display unless served with the image/svg+xml mediatype.

链接地址: http://www.djcxy.com/p/8250.html

上一篇: 是否有“默认”MIME类型?

下一篇: 适用于嵌入字体的SVG图像