微信客户端浏览器中添加时间戳骗过浏览器缓存

时间:2015-01-14 14:07:05   收藏:0   阅读:1022
<script>
  function convertURL(){
    var url = location.href;
    var timstamp = (new Date).valueOf();
    if (url.indexOf("?")>=0){
      url = url + "&ts=" + timstamp;
    }else {
      url = url + "?ts=" + timstamp;
    }
    location.href = url;
    alert(23445)
  }
  document.getElementById("refresh").onclick = function(){
    convertURL()
  };
</script>

 

原文:http://www.cnblogs.com/sussski/p/4223737.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!