Mobile app version of vmapp.org
Login or Join
Smith574

: SVG or SVGZ, what should I use? I tried compressed plain SVG (.svgz), the files are smaller and it looks the same than the regular .svg. Is there any downside? Can I use always .svgz?

@Smith574

Posted in: #Compression #FileFormat #Svg

I tried compressed plain SVG (.svgz), the files are smaller and it looks the same than the regular .svg. Is there any downside? Can I use always .svgz?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Smith574

1 Comments

Sorted by latest first Latest Oldest Best

 

@Dunderdale640

.svgz are simply gzipped svg files. The only caveat in their use is that the web-server delivering them has gzip enabled and is able to correctly set gzip headers.

All (well IE8+!) browsers support the format itself

We're venturing into stackoverflow territory here, but enabling gzip on your server is likely as easy as pasting this into .htaccess:

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>


PS - Also check out SVG scrubber which is very cool.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme