HTML5 offline cache works differently in different browsers, but always fails -


i trying grasp on how html5 offline cache works. i've read various tutorials , have tiny variations on manifest file must like. set page cache manifest this:

cache manifest index.html icon.jpg 

a .htaccess file this

addtype text/cache-manifest .manifest 

and index.html page this:

<!doctype html> <html manifest="cache.manifest"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/> <meta name="apple-mobile-web-app-capable" content="yes" />  <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <link rel="apple-touch-icon" href="icon.jpg"/>  <script> cache = window.applicationcache;  cache.onchecking = function() { statbar.innerhtml="status: checking"; }  cache.ondownloading= function()  { statbar.innerhtml="status: downloading"; }   cache.oncached = function()  { statbar.innerhtml="status: cached:"; }  cache.onerror =  function()  { statbar.innerhtml='status: error ocurred.'; }  cache.onupdateready= function() { statbar.innerhtml='updated'; }  cache.onprogress= function() { statbar.innerhtml = statbar.innerhtml + "progress!"; }  </script> <title>new web project</title> </head> <body> <h1>new web project page</h1>  <div id="statbar">status:</div> <script> statbar = document.getelementbyid("statbar"); </script> </body> </html> 

on firefox, show checking, downloading, progress, cached, using firebug add-on, says "0 items in application cache". also, status appears 2 (uncached). if accesed again, stay on checking , status appears idle.

on safari ios, checking downloading, progress "an error ocurred". same happens if accesed again.

in both cases, browsing url while offline gives "connection not found" error message. both browsers latest version available.

changing manifest cache include cache:, network: , fallback: sections didn't have effect either. using absolute urls didn't different either.

monitoring packet sniffer program called packetyzer, see manifest file being delivered browser (firefox in case), correct mime type. have idea on might doing wrong?

the files hosted @ http://www.factordice.com/html5


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -