|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
Hi Everyone, I have been working with Cache Manifest in order to locally
persist the MIMES from my WebApp. However, I have found some quirks that I wanted
to share with everyone. The idea is that someone else may, in the future, hit
the same issues and be helped by this posting. There are numerous resources on the web on structure of the
cache manifest file, so I wont go into that. Here are some of my findings: ·
Use of relative, absolute URLs seems to work
fine, so don’t be afraid to use them. Just remember that the URLs are
relative to the location of the manifest file. ·
If ANY of the URLs are wrong (i.e. return a HTTP
500 or HTTP 404, etc), the whole cache operation will fail. If this happens
just switch on the logs on your server and see which request from the browser
is failing. Unfortunately Safari (Mobile and/ Desktop) will tell you that the
cache download failed but it wont tell you which file. The other option is to
simply comment all the files out of the cache manifest file and test. Then add
another file back into the cache manifest file and test again. Repeat until you
find the offending file. ·
Our app server would do a URL re-write (inject a
session ID into each request). This was a NO NO. A 302 redirect (re-write) will
make the cache manifest fail. ·
The cache manifest download would fail if any of
the URLs was protected by username and password. Even though it did prompt the
user for a username and pwd, it still caused the cache manifest download to
fail. Luckily for us this was acceptable since the files were not of a
sensitive nature so we just made sure they were public. We auth protected the
XML files. ·
Based on the above experience (i.e. 302 and Auth
request), I would assume that if any of the files don’t return a 200 OK
response, the cache manifest will fail ·
You have to REFRESH the page after a download,
as the newly downloaded version will not be used until you refresh the page. We
handled this by displaying a message to the user to please ‘re-launch the
application’. In some ways its like asking the user to reboot their
device after installation. ·
Don’t forget to add any of the XML URLs to
the NETWORK section of the manifest file, otherwise the browser will not know
how to access them. It’s all I can think of for now. Regards, Alon Raskin |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Safari-iPhone-Web-Dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.