Disable page caching in multiple languages
- Response. Buffer = True
- Response. ExpiresAbsolute = Now ()-1
- Response. Expires = 0
- Response. CacheControl = "no-cache"
- Response. AddHeader "Pragma", "No-Cache"
2. add in html code
3. when you re-call the original page, you can pass a parameter 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
4. disable cache on the jsp page:
- Response. setHeader ("Cache-Control", "no-cache"); /// HTTP 1.1
- Response. setHeader ("Pragma", "no-cache"); // HTTP 1.0
- Response. setDateHeader ("Expires", 0); // prevents caching at the proxy server
Add these codes Intermediate:
- <%
- Response. setHeader ("Cache-Control", "no-cache"); /// HTTP 1.1
- Response. setHeader ("Pragma", "no-cache"); // HTTP 1.0
- Response. setDateHeader ("Expires", 0); // prevents caching at the proxy server
- %>
5. window. location. replace ("WebForm1.aspx"); the parameter is the page to be overwritten.
Replace principle: replace the page specified by the replace parameter with the current page. This prevents users from clicking the back key.
Example: a.html
- A
|