0

I am unable to get to get the application cache running on the iPad ios 5. I have a site on our Intranet where, if I use Safari or Chrome, the cache manifest is read in, and the files are downloaded to the cache for offline use.

I have added this logging function to my page:

function logEvent(e) {
        var online, status, type, message;
        online = (navigator.onLine) ? 'yes' : 'no';
        status = cacheStatusValues[cache.status];
        type = e.type;
        message = 'online: ' + online;
        message += ', event: ' + type;
        message += ', status: ' + status;
        if (type == 'error' && navigator.onLine) {
            message += ' (prolly a syntax error in manifest)';
        }
        console.log(message);
    }

On the desktop browsers, I get the messages:

Application Cache Checking event Application Cache NoUpdate event online: yes, event: checking, status: idle /IM/:76 online: yes, event: noupdate, status: idle

However, with the iPad, the application cache is not being read in. It should be noted that the iPad needs to connect to the website via an alternate network due to corporate policy. The messages I get with the iPad are:

online: yes, event: checking, status: uncached online: yes, event: error, status: uncached (prolly a syntax error)

We are using IIS to serve this site, and we added a MIME-type for .appcache to be served as text/cache-manifest. I did note in Fiddler from my desktop, when I requested the page, it returned:

Result Protocol Host URL Body Caching Content-Type Process Comments Custom

5 401 HTTP 10.6.4.247 /IM/cache.appcache 1,539 text/html chrome:9976

Fiddler is saying it is being served as text/html, but the status code is 401 due to us being behind a proxy.

I have no idea how to debug this further, does anyone have any idea how I can troubleshoot this?

Thanks!

Mister Epic
  • 16,295
  • 13
  • 76
  • 147
  • Just downloaded Chrome for the iPad, and offline mode works. Why would it work for Chrome but not Safari? – Mister Epic Jun 29 '12 at 13:29
  • Try this... I was having the same problems. http://stackoverflow.com/questions/16002355/application-caching-on-ipad-will-not-cache-website-data-or-pages/16132052#16132052 – TJS101 Apr 21 '13 at 14:17

0 Answers0