window.applicationCache.addEventListener("checking", function () {
        console.log("checking");
    }, true);
    window.applicationCache.addEventListener("noupdate", function () {
        console.log("noupdate");
        //init code
    }, true);
    window.applicationCache.addEventListener("downloading", function () {
        console.log("downloading");
    }, true);
    window.applicationCache.addEventListener("progress", function (e) {
        console.log("progress", e.loaded, e.total);
        $('#process').html(parseInt(100 * e.loaded / e.total) + '%');
    }, true);
    window.applicationCache.addEventListener("updateready", function () {
        console.log("updateready");
        //init code
    }, true);
    window.applicationCache.addEventListener("cached", function () {
        console.log("cached");
        //init code
    }, true);
    window.applicationCache.addEventListener("error", function () {
        console.log("error");
    }, true);