Assuming you've already written your cache.manifest and everything according to the HTML5 Offline Web Applications spec, you'll want to test it. So far, the easiest way I've found to test is in the chrome browser on your desktop. To test:
1. Go to your url. Keep your javascript console open, and you should initially see messages about the "Application Cache" being filled in. It will tell you if you have any bad links in your cache.manifest file, and you should fix those.
2. Once you're viewing your cacheable web page, click Refresh. This causes the browser to test that the manifest has good links, and again you should fix any problems you see.
3. Now that you've tested it in your desktop's browser, you can test on an ipad by pulling the link up in Safari and clicking the "Add to Home Screen" link. This will create an icon on your ipad home screen for your app. You can then click that icon to test that everything works. And then to be really sure it works, turn on Airplane mode in settings and test that you can still launch your app.
A note about testing in chrome: you cannot clear the application cache by running the standard "Clear Browsing Data". Instead, you should go to the magic url: chrome://appcache-internals/ and click "Remove this AppCache" to clear it. On the ipad, if you go to Settings, Safari, and "Clear Cache" then it appears to clear out and invalidate your local application cache.
Comments
comments powered by Disqus