1

Trying to utilize a cache manifest -- everything seems to work fine in Chrome and Safari, but not mobile Safari.

I've ensured that I've adhered to standards outlined for HTML5 offline apps:

  1. Added <html manifest="cache.manifest"> to the single-site page that's loaded

  2. Ensured the MIME type of the manifest is correct (set in .htaccess): AddType text/cache-manifest .manifest

  3. Have a syntactically correct manifest (validated via http://manifest-validator.com/). All assets are referenced with relative paths (so no change in protocol).

I receive no Javascript errors in Chrome and Safari, and am logging related events to the console with this handy snipit:

function logEvent(event) {
    console.log(event.type);
}

window.applicationCache.addEventListener('checking',logEvent,false);
window.applicationCache.addEventListener('noupdate',logEvent,false);
window.applicationCache.addEventListener('downloading',logEvent,false);
window.applicationCache.addEventListener('cached',logEvent,false);
window.applicationCache.addEventListener('updateready',logEvent,false);
window.applicationCache.addEventListener('obsolete',logEvent,false);
window.applicationCache.addEventListener('error',logEvent,false);

In mobile Safari, however, I get an "Application Cache manifest could not be fetched" error logged, as well as "checking" and "error" log events with no other explanation. Any ideas?

Evan Madow
  • 31
  • 3

1 Answers1

2

Nevermind... Turns out to you can't use a manifest behind an .htpasswd. Disabling that did the trick.

Evan Madow
  • 31
  • 3