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?

  1. check svg resource url available (that it's not 404)
  2. check it's sent correct mediatype, image/svg+xml
  3. 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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -