SnippetSpace SnippetSpace - 10 months ago 49
HTML Question

Right mime type for SVG images with fonts embedded

Possible Duplicate:

Proper MIME type for fonts

This is the usual SVG mime type:


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
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.