javascript - how to use svgz file in html5 and jboss server -
i using html5,jquery , jboss server developing spring j2ee project. using svg file in website.this files big size did compress svg svgz type. have problem loading svgz file in browser.
my html code is:
<embed width="100%" height="100%" style="opacity: 0.6;" src="${context}/resources/svg/valentines_day_heart_card_vector.svgz" type="image/svg+xml" />
the error is:
this page contains following errors:
error on line 1 @ column 1: document empty below rendering of page first error.
how can solve it?
- check svg resource url available (that it's not 404)
- check it's sent correct mediatype,
image/svg+xml
- check it's served
content-encoding: gzip
http header
you might want consider using transfer-encoding: gzip
instead, that's you. see e.g https://stackapps.com/questions/916/why-content-encoding-gzip-rather-than-transfer-encoding-gzip.
Comments
Post a Comment