【问题标题】:prevent IE from caching data with jaydata requests防止 IE 使用 jaydata 请求缓存数据
【发布时间】:2014-05-11 17:53:33
【问题描述】:

如何防止 IE 使用 jaydata 请求缓存数据?

我读过这篇文章: How to prevent a jQuery Ajax request from caching in Internet Explorer? 和这篇文章: http://www.greenvilleweb.us/how-to-web-design/problem-with-ie-9-caching-ajax-get-request/

我使用 jQuery 找到的解决方案是设置 {cache:false}。但是我怎样才能使用 jaydata 请求呢?

$data.initService(url)
  .then(function(db) {
    db.table ....

非常感谢任何建议。

【问题讨论】:

    标签: internet-explorer caching jaydata


    【解决方案1】:

    我修改了我的函数,使其接受参数“时间”。这让我可以拥有与带有 {cache: false} 的 jQuery 相同的行为。上面的链接中解释了此行为。这解决了我的问题:

    $data.initService(url)
      .then(time, function(db) {
        db.table ....
    

    【讨论】:

      猜你喜欢
      • 2014-06-17
      • 2011-02-20
      • 2015-01-06
      • 1970-01-01
      • 2013-10-24
      • 1970-01-01
      • 1970-01-01
      • 2016-07-29
      • 2010-09-29
      相关资源
      最近更新 更多