3 ms·
Why minify SVGs, but not HTML? Aren't both gzipped by the server? Is it because you're not expected to hand-edit SVGs in this scenario?
by trynewideas 7y ago
Why minify SVGs, but not HTML? Aren't both gzipped by the server? Is it because you're not expected to hand-edit SVGs in this scenario?
- mr__y 7y agoHTML may contain style and script tags. Sometimes minification may break CSS or JS - however rare that is, if you want your archive to be reliable you don't want functionality that may break something. If you intend to reduce storage space usage, HTML may be gzipped - this is "losless" so it does not carry a risk of breaking anything
- falcolas 7y agoI would imagine it’s because one is markup of text, the other serialized image data. One potentially has meaning when viewed raw, one probably doesn’t.
- Rexxar 7y agoIndeed, it should be use "plain svg" image instead. Some drawing program like Inkscape use SVG as their save format and add a lot of internal tags/properties that are just junk for other programs. Generally they offer the option to save as "plain svg" without all of this tags.