2012-12-02 23 views
2

其實我試圖從我以前的HTML頁面回來,問題是頁面刷新刷新,而不是保留價值。這是在Chrome和Firefox中,但在Safari中它的工作很好。在Chrome和FireFox中的javascript window.history.go(-1)刷新上一頁,但在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/但沒有用。

如何加載從緩存中,而不是頁面重新加載頁面上的背點擊

回答

0

嘗試:

Document.location.reload(false) 

這應該從緩存中

+1

$(「#GoBack的」重新加載頁面).click(function(){ \t window.history.go(-1); \t return false; } //這是我的代碼我應該在哪裏重新加載(false) – Ranjithkumar

+1

而不是window.histor y.go(-1);嘗試Document.location.reload(false) location =您的前頁名稱 –

+0

它的語法錯誤。 – Ranjithkumar

相關問題