Standard method, written directly in HTML
| The code is as follows |
Copy Code |
|
<meta http-equiv= "Pragma" content= "No-cache" >
<meta http-equiv= "Cache-control" content= "No-cache, must-revalidate" >
<meta http-equiv= "Expires" content= "Wed Feb, 1997 08:21:57 GMT" > |
AJAX prevents page caching
| The code is as follows |
Copy Code |
|
Response.Cache.SetCacheability (Httpcacheability.nocache); |
HTM Web page
| The code is as follows |
Copy Code |
<metahttp-equiv= "Pragma" content= "No-cache" >
<metahttp-equiv= "Cache-control" content= "No-cache,must-revalidate" >
<metahttp-equiv= "Expires" content= "WED,26FEB199708:21:57GMT" >
or <metahttp-equiv= "expires" content= "0" > |
ASP Tutorials Page
| The code is as follows |
Copy Code |
Response.expires=-1
Response.expiresabsolute=now ()-1
Response.cachecontrol= "No-cache" |
PHP Tutorials Page
| code is as follows |
copy code |
header (" Expires:mon,26jul199705:00:00gmt ");
Header ("Cache-control:no-cache,must-revalidate");
Header ("Pragma:no-cache"); |