Generally, you have done a lot of caching work on the server side. ASP. NET cache or memerycache always ignore the client cache.
As we all know that no matter which client will cache the accessed site, but the browser cache time is short, it is best to customize extended browser cache.
At this time, you need to modify the HTTP header information, which contains a field:
Cache-control:No-Cache
There are many ways to modify the header field. It is more convenient to set in Web. config. For example:
<? XML version = "1.0"?>
<Configuration>
<System. webserver>
<Staticcontent>
<Clientcache cachecontrolmode = "usemaxage" cachecontrolmaxage = "10.00: 00: 00"/>
</Staticcontent>
</System. webserver>
<System. Web>
</System. Web>
</Configuration>
This setting sets the File Cache life to 10 days, which is valid for all files in the Current Config directory. If you need to set a file separately, you can use the <location> section to configure it.
In addition to the lifecycle, you can set the expiration time, for example,. I prefer the lifecycle ,:)