I am trying to get HTML5 offline storage to work in a basic way. I read the information about DiveIntoHTML5 , and it seems to make sense, but it doesn't seem to work for me. I was wondering if anyone could help me debug this.
I basically created the homepage for the application, index.htm. Therefore, my application is located on the Internet at http://www.mydomain.com/online/index.htm . Users visit this page, where every day every day every day will do its job. Visiting this URL will create a bunch of cached files so that they can then visit http://www.mydomain.com/offline and view the working version of the application when they are offline.
The top few lines of code on the online homepage:
<!DOCTYPE html> <html manifest="cache.manifest"> <head> ...etc
I created a simple text file called cache.txt and added the following notepad to it:
CACHE MANIFEST http://www.mydomain.com/offline/scripts/jquery-1.6.3.min.js http://www.mydomain.com/offline/scripts/jquery-ui-1.8.16.custom.min.js http://www.mydomain.com/offline/scripts/modernizr.min.js http://www.mydomain.com/offline/scripts/json2.min.js http://www.mydomain.com/offline/scripts/jquery.deserialize.js http://www.mydomain.com/offline/scripts/jquery.cookie.js http://www.mydomain.com/offline/scripts/main.js http://www.mydomain.com/offline/css/main.css http://www.mydomain.com/offline/css/structure-details.css http://www.mydomain.com/offline/css/ui-lightness/jquery-ui-1.8.16.custom.css http://www.mydomain.com/img/header.gif http://www.mydomain.com/offline/img/bg.png http://www.mydomain.com/offline/img/header_riser.gif http://www.mydomain.com/offline/img/logo.png http://www.mydomain.com/offline/img/offline.png http://www.mydomain.com/offline/index.htm
Then I renamed this file to "cache.manifest" and uploaded it to the root of the online application (at the same level as my home page) so that it is available at http://www.mydomain.com/online/cache .manifest .
The hosting company supposedly added the "text / cache-manifest" content type to all files with the .manifest extension in IIS. I think this works because when I view a file in Firefox at http://www.mydomain.com/online/cache.manifest Firebug tells me what the content type is:
Content-Type cache-manifest
Or should this return "text / cache-manifest"? Perhaps this is a problem?
When I look at the offline storage folder on my system (C: \ Users \ Me \ AppData \ Local \ Mozilla \ Firefox \ Profiles \ b12u6xza.default, there is nothing connected there with this domain.
Can anyone suggest what might be wrong - how am I a little puzzled?