In IIS7 I\'ve got the ability to set caching options. These options are added to my web.config as such...
I've noticed that people often confuse the things above and write articles where recommend things as in the first block, i.e. output caching for static resources
Output caching:
Output caching is unnecessary for static files, such as HTML, JPG, or GIF files, and can cause more memory overhead for dynamic ASP.NET or PHP pages that read from a database that changes frequently
Thus
<add extension=".png" ../>
<add extension=".jpeg" ../>
etc.
is useless at least when you don't have ashx http handler for .png or .jpeg etc.
The main difference is that
the first is for server-side caching of dynamic output such as aspx pages (basically keeps the page output in memory for subsequent requests). As @artem-vertiy's answer points out, using it for static content makes no sense.
the second one is 'internet-side' : it is implemented by writing standard response headers, it tells both client browsers and public proxies how to manage cached files.