禁止ajax使用缓存,重新到服务端请求数据

jquery的ajax不到服务端请求,使用了缓存数据。

参考:

https://blog.csdn.net/weixin_41237259/article/details/86622158

https://blog.csdn.net/yangxuesong5555/article/details/79417455

推荐最优解:

调用$.ajax方法前执行一句禁止缓存即可:

$.ajaxSetup({ cache: false });

发布了388 篇原创文章 · 获赞 105 · 访问量 31万+

猜你喜欢

转载自blog.csdn.net/haoranhaoshi/article/details/104158927