質問

I have a single page dynamic web app. I created the manifest file and add the reference in the html tag. The problem I am facing now is that only in chrome the content inside the page stays old even through there are new content. On firefox it works fine when ever I load the site , the new content shows up but in chrome it shows the old content.

my manifest file

CACHE MANIFEST
# 2014-02-19:v0.11

CACHE:
/assets/kik_icon_256.png
/assets/touch-icon-iphone-precomposed.png
/assets/touch-icon-ipad-precomposed.png
/assets/touch-icon-iphone-retina-precomposed.png
/assets/touch-icon-ipad-retina-precomposed.png
/css/style.css  
/css/modal.css      
/helper/localization.js
/js/jquery.js
/js/base.js

NETWORK:
*

Index.php

<html manifest='manifest.appcache'>
役に立ちましたか?

解決

This is the express purpose of manifest files and the appcache. It's behaving as intended. Once a URL is in the appcache, the browser will only ever serve that url from the appcache. It will not talk to the network except to look for new versions of your manifest.

If you want to use new content, you need to change the content of your manifest itself, typically by bumping that version string at the top, #2014-02-19:v0.11, and then re-requesting the page. This triggers a re-download of the entire manifest file on the next download.

The old content will still be served on the request that finds the new manifest, but in the background the new manifest and new resources will download and the next request will show updated content. You can watch this happen on in the console; Chrome will display quite a bit of debugging information about what state of the manifest download.

If you want to sidestep this process, you can manually inspect and remove appcache data from chrome by going to chrome://appcache-internals/.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top