码迷,mamicode.com
首页 > 其他好文 > 详细

【IE浏览器】GET请求防止读取缓存数据的解决方法

时间:2018-06-29 19:22:22      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:color   清除缓存   AC   store   span   解决   col   dom   div   

方法1:

  设置请求头(axios封装中)

config.headers[Cache-Control] = no-cache, no-store // 清除缓存

config.headers[Pragma] = no-cache // 清除缓存

 

 


方法2:

  URL后加数学随机数 或者 时间戳

?time=new Date().getTime()  // 时间戳

?number=Math.random()  // 随机数

 

【IE浏览器】GET请求防止读取缓存数据的解决方法

标签:color   清除缓存   AC   store   span   解决   col   dom   div   

原文地址:https://www.cnblogs.com/jackjo/p/9244857.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!