HTML config no-cache (memo)
No-cache Configuration
The HTML table header is as follows
- <Meta http-equiv= "content-type" content= "text/html; Charset=utf-8 " />
- <!--HTTP 1.1--
- <Meta http-equiv= "pragma" content="No-cache">
- <!--HTTP 1.0--
- <Meta http-equiv= "cache-control" content="No-cache">
- <!--Prevent caching at the proxy server--
- <Meta http-equiv= "expires" content="0">
- <Meta http-equiv= "x-ua-compatible" content="ie=emulateie9" />
"Cache-control" common values are private, No-cache, Max-age, must-revalidate, etc.
The cache of the Web page is controlled by the "Cache-control" in the HTTP message header, and the common values are private, No-cache, Max-age, must-revalidate, etc. The default is private. Its function is divided into the following situations depending on the way in which it is browsed:
(1) Open a new window
If the value of the specified Cache-control is private, No-cache, Must-revalidate, The server will be re-accessed when a new window is opened. If you specify a max-age value, the server is not re-accessed in the time within this value, for example:
cache-control:max-age=5 The
indicates that access to this webpage will not go to the server again within 5 seconds of accessing the page
(2) in the Address bar enter
If the value is private or must-revalidate (not the same as on the web), The server will be accessed only on the first visit and will no longer be accessed at a later time. If the value is No-cache, it is accessed every time. If the value is Max-age, access is not repeated until it expires.
(3) Press Back button
If the value is private, must-revalidate, max-age, it is not re-accessed, and if it is No-cache, the access is repeated every time
(4) Press the refresh button
no matter what the value, it will be repeated access
When you specify a Cache-control value of "No-cache", accessing this page does not leave a page backup in the Temporary Internet Article folder.
Also, the cache is affected by specifying a value of "Expires". For example, to specify that the expires value is a long past time, then when you visit this network repeatedly press ENTER in the Address bar, then each time will be repeated access:
Expires:fri, Dec 1999 16:00:00 GMT
In ASP, the expires value can be controlled through the expires, ExpiresAbsolute properties of the response object, and response values are controlled by CacheControl properties of an object, for example:
Response.ExpiresAbsolute = #2000 -1-1# ' Specifies an absolute expiration time with the server local time, which is automatically converted to GMT time
Response.Expires = 20 ' Specifies the relative expiration time, in minutes, that indicates how many minutes have expired from the current time.
Response.CacheControl = "No-cache"
The expires value is seen by the properties of the temporary file that can be viewed in the Temporary Internet folder
(Web page cache control) HTML Configuration No-cache (Memo) "Cache-control" common values