Question

I have an html5 manifest hello world set up with a page

<!DOCTYPE html>
<html manifest="/manifest.appcache">
...

and the manifest

<?php header('Content-Type: text/cache-manifest');?>
CACHE MANIFEST

CACHE:
/dummyjs.js?asd=1
...

it works on chrome but it doesn't work at all on firefox (ubuntu), I checked the server log and firefox does not request manifest.appcache after it gets the page, I read this answer and I checked if the server is sending those headers but it seems it doesn't (here request and response headers)

Header della richiesta 01:45:53.000
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0
Host:   127.0.0.1
Connection: keep-alive
Cache-Control:  max-age=0
Accept-Language:    it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding:    gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Header della risposta Δ0ms
X-Powered-By:   PHP/5.5.9-1ubuntu4
Vary:   Accept-Encoding
Server: Apache/2.4.7 (Ubuntu)
Keep-Alive: timeout=5, max=100
Date:   Mon, 12 May 2014 23:45:53 GMT
Content-Type:   text/html
Content-Length: 524
Content-Encoding:   gzip
Connection: Keep-Alive

The interesting part is that it does work on windows, both ubuntu and windows have the latest version but firefox ignore the manifest attribute on ubuntu. I'd appreciate any suggestion.

Was it helpful?

Solution 2

Well, this is embarrassing. I had "never remember history" set in preferences -> privacy under History, and that was inhibiting firefox from even request the manifest. Ouch.

OTHER TIPS

1) Check if the no-cache/no-store headers are set.

2) Change content-type for .appcache files to text/cache-manifest. For Apache:

AddType text/cache-manifest .appcache

3) You can try to force the cache update by javascript:

var appCache = window.applicationCache;

appCache.update(); //this will attempt to update the users cache and changes the application cache status to 'UPDATEREADY'.

if (appCache.status == window.applicationCache.UPDATEREADY) {
  appCache.swapCache(); //replaces the old cache with the new one.
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top