JavaScript가있는 SVG 그림이있는 경우 '문서로 해석되었지만 MIME 유형 image/svg + xml로 전송 된 리소스'라고 말합니다. iframe에 포함하거나 동일한 결과를 TAG에 삽입 할 수 있습니다. 그러나 MIME 형식을 다른 것으로 변경하면 브라우저에서 렌더링 할 수 없습니다. 그래서 "image/svg + xml"이 맞습니까?리소스가 문서로 해석되었지만 MIME 유형이 image/svg + xml로 전송 된 경우 :
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>
"MIME 유형을 어떻게 변경합니까?" – MaxArt
서버가 SVGz에 대해 다음과 같이 응답합니다. Content-Type : image/svg + xml 콘텐츠 인코딩 : gzip – Matthias
이전에 embed 태그 (지금 iframe)를 사용한 다음 type = "image/svg + xml" embed tag – Matthias