cache的作用

cache的作用就是第一次请求完毕之后,如果再次去请求,可以直接从缓存里面读取而不是再到服务器端读取。

如果使用jquery,可以使用 cache参数来控制

$.ajax({
  url: "test.html",
  cache: false, //或者设置true
  success: function(html){
    $("#results").append(html);
  }
});

posted @ 2016-01-29 09:35  向阳的影子  阅读(665)  评论(0编辑  收藏  举报