Throughout a jQuery mobile site I am working on I have anchor tags that refer to urls in the following manner:
which are of course referencing:
So in my manifest file do I need to reference the "root" version at all? For example
CACHE MANIFEST
CACHE:
/directory/
/directory/index.html
/directory/subdirectory/
/directory/subdirectory/index.html
NETWORK:
*
FALLBACK:
/ /offline.html
or:
CACHE MANIFEST
CACHE:
/directory/index.html
/directory/subdirectory/index.html
NETWORK:
*
FALLBACK:
/ /offline.html
does it automatically know that "/directory/" is equivalent to "/directory/index.html", etc? seems like it wouldn't.
The cache is keyed according to URL. Whatever file the browser gets when it accesses /directory/ is whatever file it will cache for that URL. However it doesn't know automatically that /directory/index.html is equivalent to /directory/, that is something only your server could know. If you list both URLs in the manifest then both URLs will be cached, even though they turn out to be identical.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With