您现在的位置是:网站首页> 编程资料编程资料
AJAX防止页面缓存的代码_AJAX相关_
2023-05-25
458人已围观
简介 AJAX防止页面缓存的代码_AJAX相关_
采用AJAX技术的时候 通常我们无刷新页面提交数据后 用同样的url去获取数据的时候会发现是以前的数据~那样就给client端带来假象了~~ 采用以下的方法可以取消缓存
htm网页
或者
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");
htm网页
或者
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");
您可能感兴趣的文章:
相关内容
- .NET2.0环境下的Ajax选型和应用(提供Demo源码下载)_AJAX相关_
- Ajax案例集下载:新增分页查询案例(包括《Ajax开发精要》中的两个综合案例) 下载_AJAX相关_
- AJAX和JSP实现的基于WEB的文件上传的进度控制代码第1/2页_AJAX相关_
- DWR util.js 学习笔记 整理_AJAX相关_
- 强烈推荐 - Ajax 技术资源中心_AJAX相关_
- ajax视频课件 在线观看地址_AJAX相关_
- Ajax in action 英文版配书源码 下载_AJAX相关_
- Ajax实现无刷新三联动下拉框_AJAX相关_
- pjblog发表评论用的ajaxJS.js_AJAX相关_
- AJAX中同时发送多个请求XMLHttpRequest对象处理方法_AJAX相关_
