manifest

manifest首先需要服务器的支持 contengType = text/cache-manifest

manifest三部分

CACHE MANIFEST

NETWORK *

FALLBACK

1 manifest目前缓存会缓存下页面本身。

2 manifest如果有更新,那么里面的所有缓存元素都会更新,所以要做好304哦

  manifest更新发生(用户清空浏览器缓存, manifest文件修改, 应用程序更新)

3 manifest资源在浏览器加载晚于其他资源,所以不会立即看到效果

  applicationCache.onupdateready = function(){ applicationCache.swapCache(); location.reload();}

4 对manifest来说,url后面的?相当于不同url,不会用同一个文件,而#则可以

原文地址:https://www.cnblogs.com/jingwensophie/p/4778415.html