使用ajax防止页面缓存的代码
时间:2021-07-01 10:21:17
帮助过:3人阅读
- 或
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");
- ?>
jsp网页
- response.addHeader("pragma", "no-cache");
- response.addHeader("cache-control", "no-cache,must-revalidate");
- response.addHeader("expires", "0");
|