Retrieve child window reference after refresh

后端 未结 5 1619
小鲜肉
小鲜肉 2021-01-17 18:32

I have an HTML5 offline app (i.e. there\'s no server-side component/code).

It basically has two windows (parent and child). However, in some instan

5条回答
  •  逝去的感伤
    2021-01-17 19:23

    See here: http://www.w3.org/TR/html5/offline.html#dom-appcache-update

    applicationCache.addEventListener("updateready", function() {
      applicationCache.swapCache();
      //now reload the body html
    }, false);
    setInterval(60000, applicationCache.update);//check for updates every minute
    

    (updateready fires every time a new version has been downloaded)

提交回复
热议问题