Ruby On Rails with HTML5 offline apps - Firefox does not cache the application.manifest but Safari does

Posted by hoitomt on Stack Overflow See other posts from Stack Overflow or by hoitomt
Published on 2011-02-10T15:23:00Z Indexed on 2011/02/10 15:25 UTC
Read the original article Hit count: 229

I'm working off of this Railscast tutorial: episode 247

I’m up to this point in the tutorial: added the rack-offline gem, added the application.manifest route, and added a reference to the manifest in the html tag. Right before it starts talking about problems with caching.

Safari works as intended – When the server is running the page is served. From the server logs I can see that Safari is making a single request to the server every time for the items page. When I turn off the server the page displays as well, even after shutting down the browser and restarting. It appears to be pulling from the application.manifest (cache manifest).

Firefox does not work as intended – When accessing the page for the first time, Firefox lets me know that the web page wants to store something locally, I allow. After clicking on allow, Firefox makes 5 requests to the server for the page (from the server log). The hash is different in every request. Is it is possible that the changing hash is triggering Firefox to keep trying to get the new manifest until it reaches some maximum (5 attempts)?

Then, after the server is stopped, Firefox will not show the page at all. It looks like it isn’t caching the application.manifest. Firefox also gives you a way to see what sites are storing stuff locally by going to Tools/Options/Advanced/Network (Firefox/Preferences/Advanced/Network on Apple). I see localhost there but the size is 0 bytes. So for some reason, Firefox is not downloading my application.manifest along with the files

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about html5