I have a web app that contains a slide show with about 10 large images (100-200k) images. I’ve heard of people using gZip http compression to help improve the performance of their websites in the past so I started doing a little research on this. I ended up finding the following web.config snipit that claims to do this:
<system.webServer>
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
<dynamicTypes>
<add mimeType="text/*" enabled="true"/>
<add mimeType="message/*" enabled="true"/>
<add mimeType="application/javascript" enabled="true"/>
<add mimeType="*/*" enabled="false"/>
</dynamicTypes>
<staticTypes>
<add mimeType="text/*" enabled="true"/>
<add mimeType="message/*" enabled="true"/>
<add mimeType="application/javascript" enabled="true"/>
<add mimeType="*/*" enabled="false"/>
</staticTypes>
</httpCompression>
<urlCompression doStaticCompression="true" doDynamicCompression="true"/>
</system.webServer>
But after looking at it a little closer this does not appear to do anything for images.
Is using gZip compression for image mimeTypes effective or would I be wasting my time to add it to the above? Can anyone recommend any good strategies for improving the load time of large images?
Side note: Not sure if it makes a difference but the site is hosted on goDaddy.
JPG images, GIF, etc are already compressed formats. Compressing them further isn’t going to help much. You should be looking into caching them instead so that the web server returns 304 responses every time a request for the same image is made.
By the way, the
Web.configthat you posted is not doing compression on images (as it doesn’t help).UPDATE
Configure IIS to return HTTP 304 Status codes on certain file types.