0

I watch in chorme's console,there is nothing output,and no application cache why is this happen?thanks

it supported in my server

and here is my html:

<html manifest="http://www.test.com/test.manifest">

here is the content of test.manifest file:

CACHE MANIFEST       
# VERSION v1.0.120927-1430
CACHE:
http://www.test.info/js/smiles.js
# pic
http://www.test.info/imgs/user_32.gif
http://www.test.info/imgs/user_48.gif
http://www.test.info/smiles/christree.gif
http://www.test.info/smiles/horse2.gif
NETWORK: 
*

that is my js code to print the logs:

function logEvent(a) {
    console.log(a.type);
    if (a.type == "updateready" || a.type == "cached") {
        applicationCache.swapCache();
    }
    if (a.lengthComputable) {
        console.log("total:" + a.total + "  loaded:" + a.loaded);
    }
    if (a.type == "error") {
        applicationCache.update();
    }
}
if(window.applicationCache){
    window.applicationCache.addEventListener("checking", logEvent, false);
    window.applicationCache.addEventListener("noupdate", logEvent, false);
    window.applicationCache.addEventListener("progress", logEvent, false);
    window.applicationCache.addEventListener("downloading", logEvent, false);
    window.applicationCache.addEventListener("cached", logEvent, false);
    window.applicationCache.addEventListener("updateready", logEvent, false);
    window.applicationCache.addEventListener("obsolete", logEvent, false);
    window.applicationCache.addEventListener("error", logEvent, false);
}

I watch in chorme's console,there is nothing output,and no application cache why is this happen?thanks

VDP
  • 6,340
  • 4
  • 31
  • 53
  • 1
    localStorage and Offline web applications using a cache manifest are 2 very diffrent things! – VDP Sep 28 '12 at 07:17

1 Answers1

3

Your screenshots shows www.mmbang.com, but your HTML and manifest relates to www.test.com. If that's your original configuration this would never work because the manifest has to have the same origin as the website.

Marvin Emil Brach
  • 3,984
  • 1
  • 32
  • 62