AppCache Manifest Error

末鹿安然 提交于 2019-12-04 23:57:47

I solved my own issue. I re-read some of the old articles that first taught me about appcache. Turns out it was Gotcha #5.

GOTCHA #5: NON-CACHED RESOURCES WILL NOT LOAD ON A CACHED PAGE If you cache index.html but not cat.jpg, that image will not display on index.html even if you’re online. No, really, that’s intended behaviour, see for yourself.

To disable this behaviour, use the NETWORK section of the manifest

CACHE MANIFEST
# v1index.html
NETWORK:
*

The * indicates that the browser should allow all connections to non-cached resources from a cached page. Here, you can see it applied to the previous example. Obviously, these connections will still fail while offline.

I added the following to my manifest & now everything is well. Woo-hoo.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!