[英]javascript window.history.go(-1) in Chrome and Fire Fox refreshes the previous page but in Safari it works fine
實際上,我正在嘗試從上一個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/,但沒有用。
如何從緩存中加載頁面,而不是單擊后退時重新加載頁面
嘗試:
Document.location.reload(false)
這應該從緩存中重新加載頁面
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.