Html5 cache not refreshed when manifest change
I have an application where I used the application cache. When I modify the manifest file and call appcache.update () and appcache.swap () is called, the new cache is not loaded and the previous stuff is displayed unless I manually delete the old cache and refresh the page.
JS code:
window.addEventListener('load', function (e) {
//window.applicationCache.update();
window.applicationCache.addEventListener('updateready', function (e) {
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
// Browser downloaded a new app cache.
window.applicationCache.update();
if (confirm('A new version of this site is available. Load it?')) {
//window.applicationCache.swapCache();
Application = new PlatformApplication("SuccFuncApp", "ErrFuncApp");
Application.ClearCache();
window.location.reload();
//window.location.href = "http://www.google.com";
}
} else {
// Manifest didn't changed. Nothing new to server.
}
}, false);
}, false);
Manifest file:
CACHE MANIFEST
# 2010-06-18:v
test.html
style.css
images/read-more.jpg
images/warning.png
images/confirm.png
images/inner-header.jpg
images/vmoss-logo.png
scripts/jquery-1.9.0.js
scripts/applicationFeature.js
scripts/MobilesPlatform.js
NETWORK:
*
+3
source to share
1 answer
Most likely your webserver HTTP server cache control headers
check out standalone web apps as part of the ARTS ARTS
+1
source to share