ajax,asp,html,php 禁止页面缓存方法
标准方法,直接写在html里面
| 代码如下 | |
|
<META HTTP-EQUIV="pragma" CONTENT="no-cache"> |
|
ajax禁止页面缓存
| 代码如下 | |
|
Response.Cache.SetCacheability(HttpCacheability.NoCache); |
|
htm网页
| 代码如下 | |
| <metahttp-equiv="pragma"content="no-cache"> <metahttp-equiv="cache-control"content="no-cache,must-revalidate"> <metahttp-equiv="expires"content="wed,26feb199708:21:57gmt"> 或者<metahttp-equiv="expires"content="0"> |
|
asp教程网页
| 代码如下 | |
| response.expires=-1 response.expiresabsolute=now()-1 response.cachecontrol="no-cache" |
|
php教程网页
| 代码如下 | |
| header("expires:mon,26jul199705:00:00gmt"); header("cache-control:no-cache,must-revalidate"); header("pragma:no-cache"); |
|
- 上一篇:自己写的js图片切换效果
- 下一篇:js兼容ie ff ie8 图片等比例缩放代码






