2012-11-21 44 views
0

是否有可能有條件地緩存頁面jquery移動?jQuery的手機條件緩存

例如,每次將頁面導航到網站上的任何其他位置時,應重新加載頁面上的數據,除非從該頁面調用的模態對話框返回。

我只能讓它做一個或另一個,總是緩存或從不緩存。

回答

0

是的,你可以通過編程的方式調用這個函數來緩存你的頁面。

// you can get the page from where the call is being transferred from  
var referrer = document.referrer; 


// Use this code to disable the cache 
pageContainerElement.page({ domCache: false }); 

和調用模態對話框之前,你可以調用與domCache方法:真正的

// Use this code to cache the page 
pageContainerElement.page({ domCache: true }); 
+0

太好了,我會嘗試這個星期一,我會盡快爲我測試接受它作爲回答出來。謝謝。 – shuniar