Caching
You can ask the visitor's browser to cache your images on the visitor's machine. This way, the next time they are needed, they are available immediately. In addition to this, your images may pass through proxy servers on their way from the server to the browser and these proxy servers, too, can cache your images. Although not as effective as caching on the browser itself, this still improves load times because proxy servers tend to be closer to the browser than your server.
Cache-Control response header
IIS tells the browser and proxies whether an image can be cached via the Cache-Control
response header. Its possible values include:
Cache-Control value |
Description |
---|---|
|
Prevents caching in the browser or proxies. |
|
Allows caching in the browser, but not in proxies. This is the default value. |
|
Allows caching in both the browser and in proxies. |
In addition to this, the Cache-Control: max-age
header specifies the maximum time (in seconds) the browser should...