0

Possible Duplicate:
HTML 5 Appcache works in safari/opera/chrome but not firefox

Hi everyone i was trying to create a offline web app and i Used to be able to do it. But since the last changes when the .appcache extesion was required I am not beeing able to use the manifest file on Firefox. I tested the same file on Chrome and it seems to be running perfect....

Here goes my index.html

<!DOCTYPE html>
<html manifest="manifest.appcache">
<head>
    <meta http-equiv="Content-Language" content="pt-br">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled 1</title>

<script type="text/javascript">


    var cacheStatusValues = [];
    cacheStatusValues[0] = 'uncached';
    cacheStatusValues[1] = 'idle';
    cacheStatusValues[2] = 'checking';
    cacheStatusValues[3] = 'downloading';
    cacheStatusValues[4] = 'updateready';
    cacheStatusValues[5] = 'obsolete';

    var cache = window.applicationCache;

    cache.addEventListener('cached', logEvent, false);
    cache.addEventListener('checking', logEvent, false);
    cache.addEventListener('downloading', logEvent, false);
    cache.addEventListener('error', logEvent, false);
    cache.addEventListener('noupdate', logEvent, false);
    cache.addEventListener('obsolete', logEvent, false);
    cache.addEventListener('progress', logEvent, false);
    cache.addEventListener('updateready', logEvent, false); 

    function logEvent(e) {

        alert("tipo: "+e.type);

     }

     function clica_update(){

        alert("update: "+cache+" - "+cache.status);

        /*
        try{

            cache.update();

        }catch(e){

            alert("erro: "+e);

        }
        */

     };

     alert("FIM");

</script>

</head>

<body>

<p>Teste</p>
<p>&nbsp;</p>
    <p>

<button name="botao" onclick="clica_update();">button</button>

    </p>

</body>
    </html>

And here goes my manifest

CACHE MANIFEST
# rev: 2
*

When I hit the button it says the cache status is equal to 0 (uncached). Does anyone knows what it might be wrong?

By the way does anyone knows any website with a working manifest as i seem to do not find any in the web.

Ps: I checked the about:config on firefox and it seems to be ok...

Community
  • 1
  • 1

1 Answers1

0

HTML 5 Appcache works in safari/opera/chrome but not firefox

Look if the Server sets no-cache/no-store headers for the generated files. Firefox will then ignore the manifest in contrary to the other browsers.

Community
  • 1
  • 1
Marvin Emil Brach
  • 3,984
  • 1
  • 32
  • 62