Chrome和Fire Fox中的javascript window.history.go(-1)刷新了上一页,但在Safari中它运行正常

时间:2012-12-02 12:05:29

标签: javascript jquery html5

实际上我正在尝试从我以前的HTML页面返回,问题是页面获取刷新而不是仅保留值。这是在Chrome和Firefox中,但在Safari中工作得很好。

我正在使用Html缓存,如下所示。从控制台我可以看到文件加载到缓存中,我还检查了从缓存加载文件的网络。我也有meta标签。

<html  lang="ko" manifest="cache.manifest">
<head>
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      <meta http-equiv="expires" content="Mon, 10 Jan 2013  00:00:00 GMT" />
      <meta http-equiv="Cache-Control" content="public" >

    </head>
</html>

我也试过这个链接https://www.webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/,但没用。

如何从缓存加载页面而不是点击后面的页面重新加载

1 个答案:

答案 0 :(得分:0)

尝试:

Document.location.reload(false)

这应该从您的缓存中重新加载页面