: 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?
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?
More posts by @Smith574
1 Comments
Sorted by latest first Latest Oldest Best
.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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.