【问题标题】:Make the bfcache in Internet Explorer work like Firefox使 Internet Explorer 中的 bfcache 像 Firefox 一样工作
【发布时间】:2011-12-11 03:41:01
【问题描述】:

我对这个问题的公认答案有一种相反的问题: Ajax, back button and DOM updates

在那里,大多数人希望 Firefox 在使用“返回”按钮返回页面时触发“卸载”事件。

我们操作显示/隐藏的 div(导航树),然后转到另一个页面。当您单击“返回”时,Firefox 使用其 bfcache 并显示您离开时的页面(这很好)。 IE 以初始状态显示页面(这很糟糕)。 我们希望 IE 表现得像 firefox 并使用它的 bfcache,有什么技巧可以让它这样做吗?

(我们没有使用 Jquery)

【问题讨论】:

    标签: ajax internet-explorer caching dom history


    【解决方案1】:

    我发现了一个类似的问题:(Differences in Internet Explorer and Firefox when dynamically loading content then going forward and back)答案是你可以通过使用大量javascript重写文档来欺骗IE的历史机制来保留修改后的dom,或者将你想要保存的值放入隐藏的输入字段。有更好的吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-21
      • 2013-12-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多