我有一个域名为http://draft.mo2do.com的 webapp
当我访问 url 时,它将像下面的 url 一样解析并重定向到相应的站点主页
http://draft.mo2do.com/s/_91665/首页
这里我实现了离线缓存。我的 cache.manifest 文件如下
CACHE MANIFEST
# Offline cache v4.0
# All other resources (e.g. sites) require the user to be online.
NETWORK:
*
# Additional resources to cache CACHE:
# Add the pages in to the cache
/s/_91665/Home /s/_91665/CachedDraftBoard
http://draft.mo2do.com
# Add the images in to the cache
/s/store/-1/webapp/styles/webapp.css
/s/store/-1/webapp/styles/nba_draft.css
/s/store/-1/webapp/styles/add2drafthome.css?v2
# Add the js files in to the cache
/s/store/-1/webapp/scripts/jquery-1.5.min.js
/s/store/-1/webapp/scripts/iscroll.js
/s/store/-1/webapp/scripts/webapp.js
/s/store/-1/webapp/scripts/nba_draft.js
/s/store/-1/webapp/scripts/cacheUpdate.js
/s/store/-1/webapp/scripts/add2drafthome.js?v0.9.4
/webapp/icon.png /webapp/startup.png
/s/store/-1/webapp/nba/addtodrafthome/arrow.png
/s/store/-1/webapp/nba/addtodrafthome/close-bubble.png
/s/store/-1/webapp/nba/addtodrafthome/icon.png
/s/store/-1/webapp/nba/addtodrafthome/plus.png
/s/store/-1/webapp/nba/addtodrafthome/share.png
FALLBACK:
http://draft.mo2do.com
如果我直接访问站点 url,则缓存正在工作,那时我没有在缓存部分提到“http://draft.mo2do.com”。在此期间,离线缓存工作正常。
如果我在浏览器中仅直接访问域 URL“http://draft.mo2do.com”,则它不会在离线模式下打开 404。
然后我在缓存部分添加了“http://draft.mo2do.com”,当时我遇到了异常
应用程序缓存进度事件 (2 of 3) http://draft.mo2do.com/应用程序缓存错误事件:资源获取失败 (-1) http://draft.mo2do.com/
如果我也访问域,它应该在离线模式下加载应用程序。如果我访问直接 url 应用程序加载正常。
我该如何解决这个问题?