2014-05-24 64 views
3

如果我負載,同時在線鉻控制檯登錄頁面:應用程序緩存不工作,儘管Chrome的正確緩存資產

Document was loaded from Application Cache with manifest http://app.x.com/cache.manifest app.x.com/ Application Cache Checking event app.x.com/ Application Cache Downloading event app.x.com/ Application Cache Progress event (0 of 7) http://app.x.com/public/img/logos/logo.png app.x.com/ Application Cache Progress event (1 of 7) http://app.x.com/public/img/backgrounds/crowd.png app.x.com/ Application Cache Progress event (2 of 7) http://app.x.com/public/img/icons/[email protected] app.x.com/ Application Cache Progress event (3 of 7) http://app.x.com/public/js/third_party/zepto.js app.x.com/ Application Cache Progress event (4 of 7) http://app.x.com/public/css/compiled.css app.x.com/ Application Cache Progress event (5 of 7) http://app.x.com/public/js/compiled.js app.x.com/ Application Cache Progress event (6 of 7) http://app.x.com/ (index) Application Cache Progress event (7 of 7) (index) Application Cache UpdateReady event

對我來說這看起來不錯?

chrome://appcache-internals顯示:

chrome debug

但是,只要我拉我的以太網插頭,並刷新我得到一個未風格頁面,在我的控制檯如下:

nostyles

僅供參考my cache.manifest的樣子:

CACHE MANIFEST 
# v52 
CACHE: 
public/js/third_party/zepto.js 
public/js/compiled.js 
public/css/compiled.css 
public/img/logos/logo.png 
public/img/backgrounds/crowd.png 
public/img/icons/[email protected] 

NETWORK: 
* 

而我在我的.htaccess中有AddType text/cache-manifest .manifest

+0

是否有我們可以測試的地方? – 0xcaff

回答

2

這是我的錯。我在頭文件中使用了css/compiled.css?123。在開發過程中,123是一個不斷變化的數字來破壞緩存。看起來應用程序緩存將其視爲一個單獨的文件,所以我必須刪除唯一的ID或與應用程序緩存同步它才能工作。