Method 1: Add the following code in
Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Response.Expires = 0 Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "No-Cache"
Method 2: Add in HtML code
<HEAD> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="0"> </HEAD>
Method 3: when the original page is re-called, Href = "*****. asp? Random ()"
The first two methods are said to be invalid sometimes, and the third is to pass a random parameter during the jump! Because the cache of aspx is related to parameters, if the parameters are different, the cache will not be used, but the page will be regenerated. If a random parameter is passed every time, the cache can be avoided. This only applies to asp & asp.net
Method 4: window. location. replace ("WebForm1.aspx ");
The parameter is the page to be overwritten. The replace principle is to replace the page specified by the replace parameter with the current page.
This prevents users from clicking the back key. The javascript script is used, for example:
The first three types only clear the cache, that is, Temporary Files stored in the Temporary Internet Files folder, and the second type is to use the jump page file to replace the current page file without clearing the cache, that is to say, Temporary Internet Files generate related Temporary Files.