SnippetSpace SnippetSpace - 1 year ago 128
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download