41

I'm working in SVG and just read about the compressed file 'SVGZ' format. As it makes our file sizes a lot smaller, I'm quite keen on using it in our web application, however the browsers do not appear to support the format. Can anyone point to any documentation on how to use SVGZ files instead of SVG in online documents/ apps.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Zain
  • 5,391
  • 11
  • 34
  • 34

3 Answers3

35

SVGZ is just a gzipped SVG, see this.

Note: Not all browser support SVGZ. Your HTTP server may probably compresses its response with deflate, which have the same performance.

whtyger
  • 121
  • 5
J-16 SDiZ
  • 26,473
  • 4
  • 65
  • 84
8

As SVG is just plain-text you are able to send it from your server in a compressed format.

Enable Gzip Compression on Apache

Look into gzip/deflate compression for your particular http server, the support for compression in browsers is very good at the moment.

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
Phil Ricketts
  • 8,236
  • 3
  • 28
  • 31
4

Also SVGZ files cannot be opened locally by Firefox 19.0.2 or IE 9.0.8112, however, Google Chrome can. This doesn't necessarily effect people viewing it through your browser since it ought to work if you set the right mime-type, but if they download it they will not be able to open it regularily (until they un-gzip it of course).

Sled
  • 18,541
  • 27
  • 119
  • 168