Resource interpreted as Document but transferred with MIME type image/svg+xml:

When I have an SVG picture with JavaScript chrome says 'Resource interpreted as Document but transferred with MIME type image/svg+xml'. I can include it with iframe or embed TAG same result. But when I change the mime type to something different the browser cannot render it. So i guess "image/svg+xml" is correct?

SVG

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg version="1.1" baseProfile="full" id="draw" 
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 480 480"> 
<defs>
<style type="text/css">
<![CDATA[
]]>
</style>
</defs>
<rect x="0" y="0" width="480" height="480" rx="0" ry="0" fill="rgb(255, 255, 255)" />

</g>
<script type="text/ecmascript"><![CDATA[
(function () { 

//Some code here

}());
]]>
</script>
</svg>

是的, image/svg+xml是SVG内容的正确网络媒体类型,请参阅IANA。

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

上一篇: Type在IIS中设置,不能显示SVG文件

下一篇: 资源解释为Document,但是使用MIME类型image / svg + xml传输: