Frustrating issues with Firefox and offline manifests
I'm working on a demo that makes use of the HTML5 offline manifest feature (nicely described here), and I'm having a hell of a time getting things to update in Firefox now that I've begun playing with things. I thought I had my demo ready to go. Whenever I changed my code I went into the cache manifest file and modified my header so that the server would see that the file was updated. This didn't always work, so I'd also go into Firefox settings (Tools/Options/Offline storage)and run Clear Now.
So in theory - that should tell Firefox that the next time I fetch my site it should rerun my cache manifest and update it's offline cache.
But here is where things are getting me. My final bit of code was failing because a file, find.html, was being sent from the cache, and not being updated, even though I had changed the file.
I updated my manifest file but that didn't work.
I then requested find.html directly in my browser - and even that didn't work.
I cleared cache, restarted Firefox, Apache, cleared cache again, and then this is where I noticed something odd. find.html has no mention of a cache manifest. At all. But when I request find.html in my browser, Apache loads a HTTP request was for my manifest file. So Firefox "knows" the file used to be in the cache and is asking for the manifest even though my HTML in find.html clearly does not tell it to load.
If I add ?x=1 to the URL, it works. But obviously I need a better solution.
So does anyone have any clues as to what this could be? To be clear, ./find.html is in the manifest, but if I make a direct HTTP request for find.html then why would my manifest be requested instead?

I must be doing something wrong. I mean, at some point, Firefox must let me refetch an HTML page.
And instead of adding ?x=1 why not include in your manifest file a comment with a version number like # v. 0.1 ?
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType text/cache-manifest "access plus 0 seconds"
</IfModule>
http://stackoverflow.com/questions/1715568/how-to-...
So now my problem is this. From what I thought I knew, if a request was NOT listed in the manifest, it should work online, but not offline.
I'm not seeing this. I have to use NETWORK: to add the stuff I want. But - * is not working. In Chrome this is especially evident. I load up a Google Map and it never loads. NETWORL: * doesn't do squat. This _kinda_ works:
NETWORK:
http://maps.google.com/maps/api/staticmap?center=3...
http://maps.google.com/maps/api/js?sensor=false
But the issue is that Google Maps loads another JS file (one not explictely loaded in my code) and that isn't loaded since it isn't in network.
this means, just the second request shows the correct files.
i workaround it like this: check if cachemanifest is updateready, then swapcache and reload the site.
Its not great but works.
if you have NETWORK: * at the end of the file it should load the files if the navigator is online, the app will not load if its offline and these files (maps) are requestet.
i always cache the maps files, because they never change.
Oh, and interesting thing in Firefox (possibly other browsers) - changing a commented out line in the manifest (an approach Apple's developer documentation recommends) DOESN'T cause it to trigger an cache update. You must to add or remove a line with an active instruction (e.g. actually add or remove an entry for a file from the cache manifest) before it will recognise the manifest has updated. – Iain Collins Jun 14 '10 at 10:40
javascript:applicationCache.update()
in a tab as well as changing a comment line in the manifest
AS WELL as
reloading twice.
Royal. Pain.
And still - FF seems.... "off". I've got a question open on StackOverflow and will continue to report.
In Chrome, things now seem perfect, unfortunately, chrome does not have a simple way to mimic offline.
The offline cache is not cleared via Tools -> Clear Recent History (bug 538595)
The offline cache is not cleared via Tools -> Options -> Advanced -> Network -> Offline data -> Clear Now (bug 538588).
The offline cache can be cleared for each site separately using the "Remove..." button in Tools -> Options -> Advanced -> Network -> Offline data.
So here’s one thing you should absolutely do: reconfigure your web server so that your cache manifest file is not cacheable by HTTP semantics. If you’re running an Apache-based web server, these two lines in your .htaccess file will do the trick:
ExpiresActive On
ExpiresDefault "access"
Ugh.
David - whats the IIS version for that?
www.coldfusionjedi.com/demos/drivingdemo
Ray, I'm not sure but I think IIS would read the same.
in web.config of course.
I think this tips could resolve my problem ;-)
Thank you!