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。