- 论坛徽章:
- 0
|
禁止服务器端缓存:
Response.Expires = 0
或
禁用客户端缓存
HTM网页
ASP网页
PHP网页
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
JSP
response.setHeader("Pragma","No-Cache");
response.setHeader("Cache-Control","No-Cache");
response.setDateHeader("Expires", 0);
C#中禁止cache的方法!
Response.Buffer=true;
Response.ExpiresAbsolute=System.DateTime.Now.AddSeconds(-1);
Response.Expires=0;
Response.CacheControl="no-cache";
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/14529/showart_380390.html |
|