logo

New Response

« Return to the blog entry

You are replying to:

    • avatar
    • Tim C
    • Posted on Fri 3 Sep 2010 06:14 AM

    Chris

    I have learnt a fair bit during this exercise - not all good.

    Firstly, HTML5 browsers will cache locally any files mentioned in the manifest file UNTIL the manifest file changes by at least one byte (not the date time stamp).

    Thus, having listed your js /html/css/images in the manifest, the browser/device finds them locallyunless the manifest changes.

    Caveats:

    a. make sure your web server doesn't also cache the manifest! (I put it in a sub folder and turn off caching on that folder)

    b. Even ifyou change the manifest iPod/iPad can be a real pita to force to pick up changes, so write our app without the manifest and only create that when you are sure you wont' be making regular changes to the files

    Secondly, I know when I am online using this function

    function areWeOnline(){

    awo = 0;

    if(window.navigator.onLine==true){

    awo=1;

    }

    so I know whether or not I can connect to the web server and start using ajax to download content

    If you have any more questions, let me know

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: