当前位置:网站首页>ajax防止缓存方法
ajax防止缓存方法
2022-04-23 07:34:00 【beinlife】
在Ajax发送的URL参数后加上时间戳:'?time='+new Date().getTime()
如下:
$.ajax({
type:'get',//请求方式
url:'/mobilemode/apps/solex/dbsy/queryToDo.jsp?time='+(new Date()).getTime(),
data:'',
dataType:'json',//请求类型为json
timeout:7000,//请求超时后停止请求
success: function(json){
var d=json.total;//直接.total获取total属性
$('#count').html("待办事宜("+d+")");
}
});
版权声明
本文为[beinlife]所创,转载请带上原文链接,感谢
https://blog.csdn.net/beinlife/article/details/52766501
边栏推荐
- Talk about the basic but not simple stock data
- idea:使用easyYapi插件导出yapi接口
- ansible自动化运维详解(一)ansible的安装部署、参数使用、清单管理、配置文件参数及用户级ansible操作环境构建
- LeetCode简单题之三除数
- stm32以及freertos 堆栈解析
- An example of network communication based on TCP / IP protocol -- file transmission
- Transformer-XL: Attentive Language ModelsBeyond a Fixed-Length Context 论文总结
- Find the largest of 3 strings (no more than 20 characters per string).
- 总线结构概述
- 数据的删除和修改操作(mysql)
猜你喜欢

Install MySQL for Ubuntu and query the average score

Using qlst excel file

The annotation is self-defined by implementing the parameter parser handlermethodargumentresolver interface

idea:使用easyYapi插件导出yapi接口

Positioning of high precision welding manipulator

跨域配置报错: When allowCredentials is true, allowedOrigins cannot contain the special value “*“

Transformer-XL: Attentive Language ModelsBeyond a Fixed-Length Context 论文总结

LeetCode简单题之重新排列日志文件

【学习】从零开始的音视频开发(9)——NuPlayer

LeetCode简单题之三除数
随机推荐
Compiler des questions de principe - avec des réponses
Interesting JS code
ASAN 极简原理
LeetCode简单题之三除数
AAAI 2022 recruit speakers!!
分组背包呀
Kubernetes in browser and IDE | interactive learning platform killercoda
校园转转二手市场源码下载
MySQL数据库中delete、truncate、drop原理详解
LeetCode简单题之统计字符串中的元音子字符串
Qt读写XML文件
Description of the abnormity that the key frame is getting closer and closer in the operation of orb slam
LeetCode简单题之计算字符串的数字和
An idea plug-in that doesn't work, but can install X
【深度好文】Flink SQL流批⼀体化技术详解(一)
Brief description of CPU
利用Js实现一个千分位
vslam PPT
Data security has become a hidden danger. Let's see how vivo can make "user data" armor again
js常用数组方法