How to disable page caching.
1. HTML prohibits page caching, just add it to the header.
2, method in asp
-
- response.buffer = true
- response.expiresabsolute = now() - 1
- response.expires = 0
- response.cachecontrol = "no-cache"
- response.addheader "pragma", "no-cache"
Copy code
3, page caching is disabled in php.
-
- header('expires: mon, 26 jul 1997 05:00:00 gmt');
- header('last-modified: ' . gmdate('d, d m y h:i:s ') . 'gmt');
- header('cache-control: no-cache, must-revalidate');
- header('pragma: no-cache');
- ?>
Copy code
Another simplest method is to use ?mt=any data when using ajax.
|