SVGZ file format [closed]

余生颓废 提交于 2019-11-28 20:52:39

问题


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.


回答1:


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.




回答2:


I know this is an old thread, but 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.




回答3:


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).



来源:https://stackoverflow.com/questions/4733020/svgz-file-format

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!