Note that there are some explanatory texts on larger screens.

plurals
  1. POOffline appcache not working
    text
    copied!<p>Why is my offline app not cached by any browser?</p> <p>I've created a simplified test here: <a href="http://design.aqueo.us/test/appcache/" rel="nofollow">http://design.aqueo.us/test/appcache/</a></p> <p>It is only two files: a single html file plus the manifest. (The html file includes some javascript to display the cache status.) Check the console log and you'll see it always says "Cache status: Uncached". Also chrome://appcache-internals/ (in Google Chrome) does not list the site. As far as I can tell, the browser never even fetches the manifest file. I've tried this in multiple browsers.</p> <p>Here's the manifest:</p> <pre><code>CACHE MANIFEST # . </code></pre> <p>And here's the HTML:</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head manifest="offline.appcache"&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Appcache test&lt;/title&gt; &lt;script&gt; (function() { var webappCache = window.applicationCache; function loaded() { var h1El = document.querySelector("h1"); var connectionStatus = ((navigator.onLine) ? 'online' : 'offline'); h1El.textContent = h1El.textContent + " - currently: " + connectionStatus; switch(webappCache.status) { case 0: console.log("Cache status: Uncached"); break; case 1: console.log("Cache status: Idle"); break; case 2: console.log("Cache status: Checking"); break; case 3: console.log("Cache status: Downloading"); break; case 4: console.log("Cache status: Updateready"); break; case 5: console.log("Cache status: Obsolete"); break; } } function updateCache() { webappCache.swapCache(); console.log("Cache has been updated due to a change found in the manifest"); } function errorCache() { console.log("You're either offline or something has gone horribly wrong."); } window.addEventListener("load", loaded, false); webappCache.addEventListener("updateready", updateCache, false); webappCache.addEventListener("error", errorCache, false); })(); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Appcache Test&lt;/h1&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload