html5 applicationCache/manifest 添加后,html文件本身一直被缓存起来了
伊谢尔伦
伊谢尔伦 2017-04-17 13:12:50
0
1
298

我们在使用applicationCache的时候,需要在html文件上面加上
manifest="app.manifest"
但是这会导致这个html文件本身被缓存起来,即使app.manifest的内容被更新了也没用,我在chrome://appcache-internals/下面看了,首页文件还是旧的,即使把它加入到NETWORK中也没用。虽然自己在url上面加参数是可以,但用户不可能知道这件事情呢。

用localstorage进行缓存也不行,因为有另外一个bug https://segmentfault.com/q/1010000005017249

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

répondre à tous(1)
左手右手慢动作

我看到一个方法,不知道好不好
http://dreclo.blog.163.com/blog/static/528789512014111675023409/

我们可以通过插入一个不可见的 iframe 指向包含 manifest 的页面来告诉浏览器需要缓存的内容。

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!