September 2018
Beginner to intermediate
312 pages
7h 22m
English
IIS doesn't compress SVG files by default. Depending on how your server is configured, the following change needs to be made in your applicationHost.config (C:\Windows\System32\inetsrv\config) or web.config file. You simply need to add the SVG MIME type to the staticTypes and dynamicTypes elements in the httpCompression module and you're ready to go:
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"> <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" /> <staticTypes> <add mimeType="image/svg+xml" enabled="true" /> </staticTypes> <dynamicTypes> <add mimeType="image/svg+xml" enabled="true" /> </dynamicTypes></httpCompression>
Now that we've learned about serving SVG efficiently, ...
Read now
Unlock full access