This article turns from: http://www.chinaz.com/web/2015/0417/399716.shtml
what is expires head.
Expires stores a date that is used to control the expiration of a cache. When the browser sees a expires header in the response, it is saved with the corresponding component in its cache, and as long as the component does not expire, the browser uses the cached version without any HTTP requests. The date format for the expires setting must be GMT (Greenwich Standard Time).
Another option for caching in the HTTP1.1 protocol
There are obvious deficiencies in expires.
First, the Expires header uses a specific time, requiring the client and server-side clocks to be strictly synchronized. What is strict synchronization. We know that the client's time can be modified, if the server and the client time is not uniform, which leads to a possible cache premature failure of the situation, there is instability. Second, if the expires date arrives, a new date will need to be provided in the server configuration.
In the face of this situation, HTTP1.1 introduced a cache-control head to overcome the limitations of the expires head. Cache-control uses Max-age to define how long a component is cached, using seconds, such as cache-control:max-age=3600, to indicate that the component will be cached for 60 minutes. If Max-age and expires are present at the same time, the max-age has a higher priority, and the browser confirms the cache expiration time based on the max-age time.
Cache-control In addition to setting up Max-age, you can set additional labels at the same time. Common labels as shown in the following illustration:
How to configure an expired cache.
Under ASP.net, you can configure caching by Web.config files.
<span style= "FONT-SIZE:18PX;" ><span style= "FONT-FAMILY:SIMSUN;FONT-SIZE:14PX;" ><!--individually configured expires-->
<system.webServer>
<staticContent>
<clientcache Cachecontrolmode= "Useexpires" httpexpires= "Sun, Mar 2020 00:00:00 GMT"/><!--indicates that the expiration date is March 29, 2020-->
</staticContent>
</system.webServer>
<!--individually configured max-age-->
<system.webServer>
<staticContent>
<clientcache cachecontrolmode= "usemaxage" cachecontrolmaxage= "30.00:01:00" ><!--indicates that the expiration time is (30*24*60*60+60) s after-->
</staticContent>
</system.webServer>
</span></span>