HTML5 Storage Wars - localStorage vs. IndexedDB vs. Web SQL
There Are Only Two Ways to Enforce Unique Constraints in Google App Engine

Easy Way to Test Offline HTML5 Web Apps

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

Feed You can follow this conversation by subscribing to the comment feed for this post.

That is a good platform for testing HTML5 pages. I like the function where you can preview it and operate it offline.

I really appreciate your ideas and information you have mention here. I'm also agree and in favor to your knowledgeable facts and information that gathered. Thanks for having it here.. :)

Nice post! I have read it carefully and I'm like it very much. Thank you for your post it out for us!.

This is a great testing platform for HTML5 Pages. And it's awesome that you can do this even when you are offline.

I had no idea you could develop an app for the IPhone using HTML5… soooooo cool and opens it up to so many more who don’t have the C skills.

No offense, but if there's a facebook like button, it'll be much easier for me to share.

The comments to this entry are closed.