2010-12-06 5 views
11

웹 앱에 HTML 캐싱을 추가하려고합니다. 이미지/css/js가 너무 복잡합니다.cache.manifest가 처음 작동하면 실패합니다.

나는 크롬 (8)에서 다음 디버그 얻을 cache.manifest 파일을 편집 한 후 페이지를로드 할 때 : 나는 모든 CSS/이미지 /의 JS로드에 실패 다시 페이지를 새로 고침 할 때

Creating Application Cache with manifest http://example.com/themes/zenmobile/cache.manifest 
Application Cache Checking event 
Application Cache Downloading event 
Application Cache Progress event (0 of 26) http://example.com/themes/zenmobile/plugins/img/toolbar.png 
Application Cache Progress event (1 of 26) http://example.com/themes/zenmobile/plugins/img/greenButton.png 
Application Cache Progress event (2 of 26) http://example.com/themes/zenmobile/plugins/jqtouch.transitions.js 
Application Cache Progress event (3 of 26) http://example.com/themes/zenmobile/plugins/img/back_button_clicked.png 
Application Cache Progress event (4 of 26) http://example.com/themes/zenmobile/plugins/img/button.png 
Application Cache Progress event (5 of 26) http://quizible.com/sites/all/modules/jquery_update/replace/jquery.min.js 
Application Cache Progress event (6 of 26) http://example.com/themes/zenmobile/plugins/img/grayButton.png 
Application Cache Progress event (7 of 26) http://example.com/themes/zenmobile/plugins/img/chevron_circle.png 
Application Cache Progress event (8 of 26) http://example.com/themes/zenmobile/plugins/img/on_off.png 
Application Cache Progress event (9 of 26) http://example.com/themes/zenmobile/plugins/jqtouch.js 
Application Cache Progress event (10 of 26) http://example.com/themes/zenmobile/layout.css 
Application Cache Progress event (11 of 26) http://example.com/themes/zenmobile/plugins/img/chevron.png 
Application Cache Progress event (12 of 26) http://example.com/themes/zenmobile/plugins/img/rowhead.png 
Application Cache Progress event (13 of 26) http://example.com/themes/zenmobile/zenmobile.css 
Application Cache Progress event (14 of 26) http://example.com/themes/zenmobile/plugins/img/loading.gif 
Application Cache Progress event (15 of 26) http://example.com/themes/zenmobile/plugins/img/redButton.png 
Application Cache Progress event (16 of 26) http://example.com/themes/zenmobile/plugins/img/activeButton.png 
Application Cache Progress event (17 of 26) http://example.com/themes/zenmobile/images/bg_body.png 
Application Cache Progress event (18 of 26) http://example.com/themes/zenmobile/plugins/theme.css 
Application Cache Progress event (19 of 26) http://example.com/themes/zenmobile/plugins/img/toggle.png 
Application Cache Progress event (20 of 26) http://example.com/themes/zenmobile/plugins/img/whiteButton.png 
Application Cache Progress event (21 of 26) http://example.com/themes/zenmobile/plugins/img/toggleOn.png 
Application Cache Progress event (22 of 26) http://example.com/themes/zenmobile/plugins/jqtouch.css 
Application Cache Progress event (23 of 26) http://example.com/themes/zenmobile/plugins/img/button_clicked.png 
Application Cache Progress event (24 of 26) http://example.com/themes/zenmobile/plugins/img/back_button.png 
Application Cache Progress event (25 of 26) http://example.com/themes/zenmobile/plugins/img/blueButton.png 
Application Cache Progress event (26 of 26) 
Application Cache Cached event 

을하고, 콘솔 로그는 결선 :

Document was loaded from Application Cache with manifest http://example.com/themes/zenmobile/cache.manifest 
Application Cache Checking event 
Application Cache NoUpdate event 

는 다음의 부하가 나는 시도하고이 문제를 해결하는 유용한 아무것도 발견하지 않았습니다이 출력 이외에

을 '자원을로드하지 못했습니다'. 이걸 본 사람 있어요?

+0

cache.manifest 파일에 FALLBACK 리소스가 선언되어 있습니까? –

+0

아니 대체 리소스가 없습니다. – digital

답변

0

html5 매니페스트는 처리하기가 어렵습니다. 그것은 하나 개의 브라우저에서 작동하는 경우는 (불을 지르고 또는 웹킷)
2) 내가 찾은를 사용하는 자원 오류의 원인이 확인하려면 자원 탭에서 봐) 다른

1에서 작동하지 않을 수 있습니다 그 매니페스트 이름을 변경 모든 배포는 브라우저가 변경 사항을 감지하는지 확인하는 데 도움이됩니다.

0

매니페스트 파일에없는 다른 리소스를로드하고 있습니까? 모두 나열하고 문제가 계속 발생하는지 확인하십시오.

19

동일한 문제가있었습니다. 나를 위해 그것을 고정 하단에이 퍼팅 :

NETWORK: 
* 

그리고 대부분의 사람들이 매니페스트 업데이트가 발생하는 문제를 해결하기는,이 방법은 나를 위해 정말 잘 작동합니다

부착에게 매니페스트 파일과 모든 캐시를 URL에 버전 번호가있는 리소스를 추가하고 매니페스트의 내용을 해당 버전 번호를 참조하도록 설정합니다. 그래서 같이 :

<html manifest="path/to/cache.manifest?v=42"> 

CACHE MANIFEST 
#rev ?v=42 

/css/foo.css?v=42 
/css/bar.css?v=42 
/js/script.js?v=42 

(A 설정이 내가 읽어 파일 어딘가에서) 난 그냥 1 수를 올리는 새로운 배포를 가진, 그래서 나는, 우리를 위해이 문제를 자동화하고 그것입니다 언급 된 모든 파일에서 영향을받습니다. 각 브라우저 요청은 매니페스트 파일 변경을 감지 할뿐만 아니라 언급 된 모든 리소스를 다시로드 (및 캐시)하여 전체 응용 프로그램을 업데이트합니다.