Gzipping and SVG icons

Gzipping and SVG icons

deur David Scotson -
Getal antwoorde: 5
Does anyone know if it's recommended to gzip your SVG icons?

I'm getting told by Google Page Speed service that turning this on could reduce the size of the icons by half, but I don't know if it would break things.

I've already got it on for the other files in the server, but the defaults seem to miss the icons (maybe because they don't have a file extension?)
Gemiddeld van beoordelings: -
In antwoord op David Scotson

Re: Gzipping and SVG icons

deur Gareth J Barnard -
Prentjie van Core developers Prentjie van Particularly helpful Moodlers Prentjie van Plugin developers

Would turning your icons into a font using say Inkscape make things faster?

Gemiddeld van beoordelings: -
In antwoord op Gareth J Barnard

Re: Gzipping and SVG icons

deur David Scotson -
Probably, but this applies also to the colorful resource icons which don't have a good font alternative too.
Gemiddeld van beoordelings: -
In antwoord op David Scotson

Re: Gzipping and SVG icons

deur Danny Wahl -

h5bp does:

https://github.com/h5bp/server-configs-apache/blob/master/.htaccess#L501

AFAIK as long as your mime-types are set correctly then the extension doesn't matter, but I don't know why a file wouldn't have an extension (other than executables)

Gemiddeld van beoordelings:Useful (1)
In antwoord op Danny Wahl

Re: Gzipping and SVG icons

deur Julian Ridden -

I'm with Danny. I did not think the extension itself had an impact but more how it was compressed.

Julian

Gemiddeld van beoordelings: -
In antwoord op Danny Wahl

Re: Gzipping and SVG icons

deur David Scotson -

Thanks, that's good info.

By not having an extension I mean like:

https://moodle.org/theme/image.php/moodleofficial/mod_forum/1385121489/icon

Which the server decides whether to send as SVG or PNG (or GIF) and sets the mimetype appropriately.

It turns out our live servers already have gzip turned on for SVG anyway, it was only the test server that was set up differently. So it all seems to have been working fine for the last year or so.

cheers,

dave

Gemiddeld van beoordelings: -