html5 application cache manifest file progress error
in my web app i am using simple.manifest file for application cache. if i write as
CACHE MANIFEST
CACHE:
img/logo.png
FALLBACK:
/ offline.html
NETWORK:
*
it's working fine. but if i write as
CACHE MANIFEST
CACHE:
/img/logo.png
FALLBACK:
/ /offline.html
NETWORK:
*
it's not working. i am getting error resourse fetch failed(404) . i am working in apche tomcat. i pute my apps as
apache/webapps/sconnolly/offline.html
apache/webapps/sconnolly/img/开发者_运维技巧logo.png
apache/webapps/sconnolly/sample.manifest
what may be cause of this error.
The leading slash refers to the root directory. Whereas if you omit the leading slash the url will be relative to the path you're in.
Therefore:
img/logo.png will refer to apache/webapps/sconnolly/img/logo.png
Whereas
/img/logo.pmg will most likely refer to apache/webapps/img/logo.png
精彩评论