<p>I'm trying to find the best way to speed up the delivery of the static images that compose the design of an mvc site. The images are not gzipped, nor cached in the server or on the client (with  content expire). Options are:</p>

<ol>
<li>Find why images are not cached and gzipped direcly from IIS6</li>
<li>Write a specialized http handler</li>
<li>Register a special route for static images and write a bynary actionresult method</li>
</ol>

<p>What could be the best solution in terms of performance?</p>

[{'answer_id': 17068, 'author': 'Darren Kopp', 'author_id': 77, 'author_profile': 'https://Stackoverflow.com/users/77', 'pm_score': 3, 'selected': True, 'text': '<p>Best solution is to let IIS do it.</p>\n\n<p><a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true" rel="nofollow noreferrer">IIS6 Compression</a> - most likely you need to <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true" rel="nofollow noreferrer">specify file types to be compressed</a> like .jpg, .png, .gif types, etc.</p>\n\n<p>Caching will come from making sure that the correct headers are being sent to the client from code, and i believe there is a setting you can set in IIS that enables it for static content, but i\'m not sure on that one.</p>\n'}, {'answer_id': 259507, 'author': 'Paul Mrozowski', 'author_id': 3656, 'author_profile': 'https://Stackoverflow.com/users/3656', 'pm_score': 1, 'selected': False, 'text': '<p>There\'s a nice library up on the MSDN Code Gallery that does this. It\'s called <a href="http://code.msdn.microsoft.com/fastmvc" rel="nofollow noreferrer">FastMVC</a>.</p>\n'}, {'answer_id': 494453, 'author': 'Simon_Weaver', 'author_id': 16940, 'author_profile': 'https://Stackoverflow.com/users/16940', 'pm_score': 2, 'selected': False, 'text': '<p>Surely the gain from gzipping most images is negligable since they\'re already compressed ? </p>\n\n<p>Naybe you have some really badly compressed PNG files or something?</p>\n\n<p>You might want to check out yahoo\'s performance advice site which includes some useful tips on <a href="http://developer.yahoo.com/performance/rules.html#opt_images" rel="nofollow noreferrer">optimizing images</a> including links to utilities such as <a href="http://pmt.sourceforge.net/pngcrush/" rel="nofollow noreferrer">pngcrush</a>.</p>\n\n<p>its much better to use an image optimizing utility ONCE than to rely on IIS to compress them (possibly inefficiently) on the fly.</p>\n'}]
['https://Stackoverflow.com/questions/17057', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1929/']