点击前进、后退键后自动刷新页面,如何禁掉页面缓存
禁用缓存如下:
1、客户端代码:
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
2、asp.net 服务器端代码:
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";
Response.Expires = 0;
Response.CacheControl = "no-cache";