HTML5 AppCache Problems in a Load Balanced Environment

Solving HTML5 AppCache Update Errors in a Load Balanced Environment

I have a client that I’ve build an HTML5 web app for that is designed specifically for the iPad. It has all of the off-line storage capabilities any HTML5 web dev nerd could hope for. It uses an HTML5 cache manifest to store all of the files locally and local storage to maintain imported data if connectivity is lost. The app itself is hosted on a dual server environment that has a load-balancer sitting in front the two servers.

Anyways, sometimes I experience some trouble rolling out updates due to problematic appcache manifest issues. Even though I have all of the javascript event listeners to check for cache updates and reload the page when one is found, I have still had this issue come up from time to time. Usually, it’s one or two out of 20 iPads that just do not update.

The solution I found was fairly easy. I disabled one box and updated the appcache file and had the client reload the app on these devices. Since I had a server indicator text on each version (web1/web2, etc.), I knew that the problematic server was number 2. Once I disabled that server, all of the remaining apps updated with out a problem.

The joy of using brand new technologies.

Comments are closed.