ajax缓存解决

ajax缓存解决
方法1:
  1. xmlhttp.setRequestHeader("Cache-Control","no-cache");
  2. url += "&random="+Math.random();
  3. url += "&timestamp="+new Date().getTime();

方法二:

//处理页面缓存
  response.setHeader("Pragma","No-cache");
  response.setHeader("Cache-Control","no-cache");
  response.setDateHeader("Expires", 0);

你可能感兴趣的:(ajax缓存解决)